Answer the question
In order to leave comments, you need to log in
How to set up WordPress CNC on Apache2?
Hello! Now all site links look like site.ru/?page_id=xxxx
When in the Settings - Permalinks section I change to "Post Title" errors 404 start to fly out. What could be the reason?
OS: Debian Jessie 8.5
Server: Apache2
Apache 2 config:
<VirtualHost *:80>
#dfkids
ServerName dfkids.redcap52.ru
ServerAlias www.dfkids.redcap52.ru
ServerAdmin [email protected]
DocumentRoot /var/www/dfkids
ErrorLog ${APACHE_LOG_DIR}/error_df.log
CustomLog ${APACHE_LOG_DIR}/access_df.log combined
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
I had the same issue. The solution is to configure Apache so that it can use .htaccess (might be wrong about the reason). I edited the /etc/apache2/apache2.conf file, added the following parameters to the section that is responsible for the localhost. I don’t remember exactly, but in my opinion, AllowOverride none just changes, and AllowOverride All looks like this:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo apache2ctl restart
. But I want to warn you that I'm using Ubuntu 16.04 x64, so something may and will be different for you. And of course, you need to take into account the rights to the folder with the localhost, so that the server can easily make entries there. # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question