Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Feb 08, 2015 8:28 pm 
Offline
Newbie

Joined: Sun Feb 08, 2015 8:11 pm
Posts: 2
I'm new to all this but here goes....I've configured LAMP on my linode and have successfully installed wordpress. However, when I change to a custom permalink structure I get a 404 Error:

The requested URL /example-blog/ was not found on this server.
Apache/2.4.7 (Ubuntu) Server at www.example.com Port 80

Any clue as to what I am doing wrong???

My .htaccess file contains:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

My config file located at /etc/apache2/sites-enabled/example.com.conf contains:
<VirtualHost *.80>
ServerAdmin: webmaster@example.com
ServerName: www.example.com
ServerAlias: example.com
DirectoryIndex index.html index.php
DocumentRoot /var/www/example.com/public_html

<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Loglevel warn
ErrorLog /var/www/example.com/log/error.log
CustomLog /var/www/example.com/log/access.log combined
</VirtualHost>


Top
   
PostPosted: Sun Feb 08, 2015 11:29 pm 
Offline
Newbie

Joined: Sun Feb 08, 2015 8:11 pm
Posts: 2
I found a fix to the problem. My htaccess file remained the same as originally shown. I changed the config file located at /etc/apache2/sites-enabled/example.com.conf to the code below and it worked!!!

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>


Top
   
PostPosted: Tue Feb 17, 2015 12:43 pm 
Offline
Newbie

Joined: Tue Feb 17, 2015 7:00 am
Posts: 2
I'm having exactly the same problem, and your fix is not working for me...anyone knows how to fix this?


Top
   
PostPosted: Tue Feb 17, 2015 3:22 pm 
Offline
Newbie

Joined: Tue Feb 17, 2015 7:00 am
Posts: 2
I've tried changing .htaccess , apache2.conf and conf file in sites-enabled...but it still won't work

P.S. Permalinks only work on default permalink settings...


Top
   
PostPosted: Thu Feb 26, 2015 1:41 am 
Offline

Joined: Thu Feb 26, 2015 1:30 am
Posts: 1
Did you get a solution? I'm having the same issue.

_________________
iPhone App Developer


Top
   
PostPosted: Wed May 27, 2015 7:44 am 
Offline
Newbie

Joined: Wed May 27, 2015 7:22 am
Posts: 3
Website: http://www.nintriva.com
Location: kochin
Hi All!

I'm new to this forum so i just share an information about this topic;

1) I reinstalled 3.8.1 from the dashboard.
2) I changed themes including one time to Twenty Fourteen.
2) I disabled all plugins.
3) I renamed the plugins folder (to test if a deactivated plugin may be the culprit).
4) I checked the .htaccess file and made sure it includes this code:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

5) I changed the permission of .htaccess to 444, 644, and just about all the combinations available.
6) I tried viewing the post when logged in vs. not logged in.

The above reasons reasons are explains the wordpress permalinks not working.

Thank you keep in touch with me... :)

_________________
yii framework


Top
   
PostPosted: Thu May 28, 2015 5:08 pm 
Offline
Newbie

Joined: Thu May 28, 2015 5:06 pm
Posts: 2
You may not have the apache rewrite module installed.

To do this, run the following:

sudo a2enmod rewrite
sudo service apache2 restart

This will install the apache rewrite module and restart apache. If your settings are the same as above, this should take care of your issue.


Top
   
PostPosted: Fri May 29, 2015 6:18 am 
Offline
Newbie

Joined: Wed May 27, 2015 7:22 am
Posts: 3
Website: http://www.nintriva.com
Location: kochin
djohnston wrote:
You may not have the apache rewrite module installed.

To do this, run the following:

sudo a2enmod rewrite
sudo service apache2 restart

This will install the apache rewrite module and restart apache. If your settings are the same as above, this should take care of your issue.


okay thanks for your informations. stay in touch with me... :)

_________________
yii framework


Top
   
PostPosted: Fri May 29, 2015 9:05 am 
Offline
Newbie

Joined: Thu May 28, 2015 5:06 pm
Posts: 2
Did that work for you?


Top
   
PostPosted: Tue Aug 18, 2015 9:44 am 
Offline

Joined: Thu Aug 13, 2015 4:49 am
Posts: 1
I've tried with changing .htaccess , apache2.conf and conf file in sites-enabled...

Also i have enabled apache rewrite module.

but it still not working..Home page only working..Please Help :roll: !!


Top
   
PostPosted: Sun Oct 25, 2015 12:25 am 
Offline

Joined: Sun Oct 25, 2015 12:14 am
Posts: 1
Had similar problems, moved my wordpress from another host to linode, Ubuntu. Homepage was working, but non of the permalinks. So I collected all of the following from hours of painful searching, and experimenting, I think this is the complete process that got things working again me.

1) Enabled mod rewrite

sudo a2enmod rewrite
sudo service apache2 restart

2) edited the whole apache conf

sudo vim /etc/apache2/apache2.conf

Find:

<Directory /var/www/>

And make sure the AllowOverride directive is set to All.

3) Edited the conf for my local virtual host (/etc/apache2/sites-enabled/example.com.conf), inserting the following code INSIDE the virtual host tags:

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

4) Created .htaccess in /var/www/example.com/public_html

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

5) Chown'd the .htaccess

sudo chown www-data:www-data .htaccess

5) Restarted apache again

sudo service apache2 restart

6) Logged in to wordpress, saved the permalink schema as 'default'. Tested, it seemed to work. Saved the permalink to another schema (the one I had used for the site) and it worked.

Not if the double apache conf changes are redundant, but I had tried them individually with success. Although who knows, at this point, where there are 6 variables, its really, really easy to get one of them out of line... especially when the .htaccess creation just fails silently. Still don't know why wordpress was neither creating the .htaccess file itself nor throwing any kind of error.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group