Welcome Guest, Not a member yet? Register   Sign In
Running CI on SSL site
#1

[eluser]David U[/eluser]
I'm trying to run a CI app on an SSL server. The server is shared, and has an internal server root address of this form:
e:\server_address\my_section\
(backslashes, as it's a Microsoft server).

I've loaded a working CI app into this section, but when I type in the URL (https://www.mysite.com) it either simply hangs, or comes up with a 404 page.

I put in a few diagnostic 'echo' lines, which show up on the screen, until CI gets half way through the Router library, somewhere in the _validate_segments() function.

From these I can see that if I make a call to the bare url (ie www.mysite.com) CI puts together an internal server address which doesn't include the default controller, ie it looks for
"e:\server_address\my_section\\system_folder\\application\controllers\index.php".
which of course is not there. (Earlier on it has loaded the default controller, and echoed it back to me.)

If I try to call a specific controller in the URL (ie my_site.com/index.php/controller/function) it just goes straight to the 404 page and doesn't even print out any diagnostics.

Trying to get rid of the double backslashes is also proving difficult, but I'm not sure how much this matters!

I've never used SSL before and I'm not sure if this is an SSL problem or something to do with the way my ISP is handling files, or even because it's a Microsoft server.

Very gratful for any advice / ideas?
#2

[eluser]Randy Casburn[/eluser]
Without more detail David, the very first thing I'm going to tell you is to go in to your config.php file and change all the backslashes to forward slashes.

Do that now and try it.

Nearly every PHP internal function deals with either construct and prefers forward slashes _even on a Windoze machine_.

This should always be your default.

Now is your Windows box running IIS or Apache?
#3

[eluser]David U[/eluser]
Thanks, Randy, I took your advice. I'm sure you are right, but the problem apparently goes deeper than that!

Then I tried changing the config/config file: the URI protocol section, ie where the options are
$config['uri_protocol'] = "AUTO";
$config['uri_protocol'] = "PATH_INFO";
$config['uri_protocol'] = "QUERY_STRING";
$config['uri_protocol'] = "REQUEST_URI";
or
$config['uri_protocol'] = "ORIG_PATH_INFO";

If I used the 'query_string' or 'request_uri' options, the site would log on to the default page (ie https://www.my_isp/my_folder/ - the default entry page.) So clearly a connection is possible.

But if I either tried the hyperlinks on that page, or typed in a url by hand (eg https://www.my_isp/my_folder/index.php/c...nction.php) it did two things
1. generated the correct URL to go to
2. returned a 404 page.

I assumed it was failing to parse the url segments correctly - ie when there were none to parse, it put up the default controller, but otherwise it took a correctly formed URL and misunderstood it.

I was still using CI 1.5.2. So I updated to CI 1.6.2, as the changelog mentions fixing a bug with uri routing - but now it won't even find the default page.....

To answer your second question, my ISP's remote ssl server is IIS v 6.0 running on some NT variant, quite a recent one I assume from the build dates.

I'm still puzzled and would be grateful for any help.
#4

[eluser]Randy Casburn[/eluser]
Since this is a server you are attempting to secure, I'm not sure want to share your configs with me here. Would you like to PM me about this?

Randy




Theme © iAndrew 2016 - Forum software by © MyBB