Question

Wordpress permalinks problem on Ubuntu

I install wordpress and all works fine, only i can’t change my permalinks. When i try to do that i get 404 error. I create .htaccess file in worpdress root folder, below folders wp-admin, wp-content, wp-include…

I paste this in .htaccess

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

and set permisions to 666. Also mod_rewrite is enable on my server and I restart server too. You can see my error on stuff2share.net [try to open some post]. Do you have any idea what to do? Where i can do this? “Edit your VirtualHost config making sure AllowOverride is set to all.” On my server i have 3 domain, 3 Virtual hosts but i don’t can’t find AllowOverride there… :/


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

ok… i done it… It works great… For others i will weite here how to SOLVE permalinks problem on Ubuntu. <br> <br>when you install wordpress, thne you need to create .htaccess file in root folder of wordpress [under the folder wp-admin, wp-content, wp-include], <br>In htacces file just paste this : <br> <br># BEGIN WordPress <br>RewriteEngine On <br>RewriteBase / <br>RewriteRule ^index.php$ - [L] <br>RewriteCond %{REQUEST_FILENAME} !-f <br>RewriteCond %{REQUEST_FILENAME} !-d <br>RewriteRule . /index.php [L] <br># END WordPress <br> <br>and set permissions on that folder 664 <br> <br>after that go to etc/apache2/site-available/yoursite.com.conf <br> <br>And on the end of that file just paste this <br> <br> <Directory /var/www/> <br> Options Indexes FollowSymLinks MultiViews <br> AllowOverride All <br> Order allow,deny <br> allow from all <br> </Directory> <br>That’s all. I hope it will help you. <br>

Thank you for your answer. <br> <br>Do I need to put that 'AllowOverride all here? : <br> <br><VirtualHost *:80> <br> # The ServerName directive sets the request scheme, hostname and port that <br> # the server uses to identify itself. This is used when creating <br> # redirection URLs. In the context of virtual hosts, the ServerName <br> # specifies what hostname must appear in the request’s Host: header to <br> # match this virtual host. For the default virtual host (this file) this <br> # value is not decisive as it is used as a last resort host regardless. <br> # However, you must set it for any further virtual host explicitly. <br> <br> ServerName stuff2share.net <br> <br> ServerAdmin webmaster@localhost <br> DocumentRoot /var/www/stuff2share.net/public_html/ <br> <br> <br> <br> # Available loglevels: trace8, …, trace1, debug, info, notice, warn, <br> # error, crit, alert, emerg. <br> # It is also possible to configure the loglevel for particular <br> # modules, e.g. <br> #LogLevel info ssl:warn <br> <br> ErrorLog ${APACHE_LOG_DIR}/error.log <br> CustomLog ${APACHE_LOG_DIR}/access.log combined <br> <br> # For most configuration files from conf-available/, which are <br> # enabled or disabled at a global level, it is possible to <br> # include a line for only one particular virtual host. For example the <br> # following line enables the CGI configuration for this host only <br> # after it has been globally disabled with “a2disconf”. <br> #Include conf-available/serve-cgi-bin.conf <br></VirtualHost> <br> <br># vim: syntax=apache ts=4 sw=4 sts=4 sr noet <br>

Manuall add the ‘AllowOverride all’ line to the virtaul hosts <br> <br>For more info http://codex.wordpress.org/Using_Permalinks <br>