1
votes

I'm trying to enable ssl on my wordpress site and am running into a bit of difficulty. I've enabled ssl admin through the wordpress ssl plugin (well reviewed) and also required ssl for a couple other pages. The administration panel works well with https as does the homepage and a couple other pages. However on many of them, namely pages that I've dynamically generated with a php plugin that I wrote, I get a 404 error:

Not Found

The requested URL /create/5 was not found on this server.

Apache/2.2.22 (Ubuntu) Server at upsmart.com Port 443

Approaches that havent worked so far include:

I've enabled mod-rewrite on the server, I've tried changing the site url in the dashboard to explicitly be https:// and I've scanned the php for hard-coded instances of http://

Really scratching my head on this one so any ideas would be appreciated.

For reference I'm using Apache on Ubuntu 12.04.

Update! I checked my Apache error log and came out with the following message:

File does not exist: /home/user/www/create

My reaction upon seeing that is "Well of course it doesn't. If I'm trying to get it to get it to http://example.com/create/ why would it be reading that as ~/www/create?

2

2 Answers

0
votes

Please allow me to blush a little; the update I gave to the question above allowed me to take a guess at the issue but I'll put it down in case anyone else runs into the problem.

I found that I had only half-configured the file /etc/apache2/sites-enabled/default-ssl.

The file began as follows:

ServerAdmin webmaster@localhost

    DocumentRoot /home/sam/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /home/sam/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride none
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

The issue was that the second AllowOverride needed to be changed from none to all. So that it would look like this.

ServerAdmin webmaster@localhost

    DocumentRoot /home/sam/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /home/sam/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride none
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

Mind you: This must be configured for ssl even if you have configured this for other sites-enabled like 000-default.

0
votes

There's no difference between the configurations.