Apache settings WP 4.9.6
-
I’m new with WordPress and so-so with Apache I have site and it asks me to setup apache: http://joxi.ru/zANnKV8tBjw0ZA Needed settings:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
1) This: RewriteBase / cause error and I can’t save settings (I must use ISPmanager), so I have removed this line.2) Problem is that if this code exist, I can open /wp-admin and main page and I can’t open links like /shop
but if it (code from above) exists, then vice-versa: I can’t enter /wp-admin, but I can open website links. (When I go to /wp-admin it just opens main page)
Could you please help with htaccess?
My apache on CentOs 7:
<VirtualHost 185.92.74.123:80>
ServerName domain.tk
DocumentRoot /var/www/user456/data/www/domain.tk
ServerAdmin [email protected]
AddDefaultCharset off
SuexecUserGroup user456 user456
CustomLog /var/www/httpd-logs/domain.tk.access.log combined
ErrorLog /var/www/httpd-logs/domain.tk.error.log<FilesMatch “\.ph(p[3-5]?|tml)$”>
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch “\.phps$”>
SetHandler application/x-httpd-php-source
</FilesMatch>
<IfModule php5_module>
php_admin_value sendmail_path “/usr/sbin/sendmail -t -i -f [email protected]”
php_admin_value upload_tmp_dir “/var/www/user456/data/mod-tmp”
php_admin_value session.save_path “/var/www/user456/data/mod-tmp”
php_admin_value open_basedir “/var/www/user456/data:.”
</IfModule>
<IfModule php7_module>
php_admin_value sendmail_path “/usr/sbin/sendmail -t -i -f [email protected]”
php_admin_value upload_tmp_dir “/var/www/user456/data/mod-tmp”
php_admin_value session.save_path “/var/www/user456/data/mod-tmp”
php_admin_value open_basedir “/var/www/user456/data:.”
</IfModule>
ServerAlias http://www.domain.tk
DirectoryIndex index.php index.html
</VirtualHost>
<Directory /var/www/user456/data/www/domain.tk>
Options +Includes -ExecCGI
<IfModule php5_module>
php_admin_flag engine on
</IfModule>
<IfModule php7_module>
php_admin_flag engine on
</IfModule>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</Directory>
<VirtualHost 185.92.74.123:443>
ServerName domain.tk
DocumentRoot /var/www/user456/data/www/domain.tk
ServerAdmin [email protected]
AddDefaultCharset off
SSLEngine on
SSLCertificateFile “/var/www/httpd-cert/user456/domain.tk_le1.crt”
SSLCertificateKeyFile “/var/www/httpd-cert/user456/domain.tk_le1.key”
SSLHonorCipherOrder on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4
SuexecUserGroup user456 user456
CustomLog /var/www/httpd-logs/domain.tk.access.log combined
ErrorLog /var/www/httpd-logs/domain.tk.error.log
<FilesMatch “\.ph(p[3-5]?|tml)$”>
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch “\.phps$”>
SetHandler application/x-httpd-php-source
</FilesMatch>
<IfModule php5_module>
php_admin_value sendmail_path “/usr/sbin/sendmail -t -i -f [email protected]”
php_admin_value upload_tmp_dir “/var/www/user456/data/mod-tmp”
php_admin_value session.save_path “/var/www/user456/data/mod-tmp”
php_admin_value open_basedir “/var/www/user456/data:.”
</IfModule>
<IfModule php7_module>
php_admin_value sendmail_path “/usr/sbin/sendmail -t -i -f [email protected]”
php_admin_value upload_tmp_dir “/var/www/user456/data/mod-tmp”
php_admin_value session.save_path “/var/www/user456/data/mod-tmp”
php_admin_value open_basedir “/var/www/user456/data:.”
</IfModule>ServerAlias http://www.domain.tk
DirectoryIndex index.php index.html
SSLCertificateChainFile “/var/www/httpd-cert/user456/domain.tk_le1.ca”
</VirtualHost>
The topic ‘Apache settings WP 4.9.6’ is closed to new replies.