nginx forbiden in wordpress configuration file sites-available
server {
server_name _;
return 302 $scheme://example.com$request_uri;
}
server {
listen 80;
server_name example.com www.matemhr.ro;
access_log /var/log/nginx/matemh.access.log;
error_log /var/log/nginx/matemh.error.log;
root /var/www/html/site/;
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
#If a file isn’t found, 404
try_files $uri =404;
#Include Nginx’s fastcgi configuration
include /etc/nginx/fastcgi.conf;
#Look for the FastCGI Process Manager at this location
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
Tx to https://www.cyberciti.biz/faq/how-to-configure-nginx-for-wordpress-permalinks/
server_name _;
return 302 $scheme://example.com$request_uri;
}
server {
listen 80;
server_name example.com www.matemhr.ro;
access_log /var/log/nginx/matemh.access.log;
error_log /var/log/nginx/matemh.error.log;
root /var/www/html/site/;
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
#If a file isn’t found, 404
try_files $uri =404;
#Include Nginx’s fastcgi configuration
include /etc/nginx/fastcgi.conf;
#Look for the FastCGI Process Manager at this location
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
Tx to https://www.cyberciti.biz/faq/how-to-configure-nginx-for-wordpress-permalinks/
Comments
Post a Comment