Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # WPSINGLE BASIC NGINX CONFIGURATION
- server {
- listen 80;
- server_name avivroth.com www.avivroth.com;
- access_log /var/log/nginx/avivroth.com.access.log rt_cache;
- error_log /var/log/nginx/avivroth.com.error.log;
- root /var/www/avivroth.com/htdocs;
- index index.php index.htm index.html;
- location ~ \.php$ {
- location ~ /wp-(admin|login) {
- return 301 https://$host$request_uri;
- }
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass php;
- }
- location / {
- try_files $uri $uri/ /index.php$is_args$args;
- }
- include common/wpcommon-fixed.conf;
- include common/locations.conf;
- }
- server {
- listen 443;
- server_name avivroth.com www.avivroth.com;
- access_log /var/log/nginx/avivroth.com.access.log rt_cache;
- error_log /var/log/nginx/avivroth.com.error.log;
- root /var/www/avivroth.com/htdocs;
- index index.php index.htm index.html;
- ssl on;
- ssl_certificate /etc/ssl/certs/avivroth.com.crt;
- ssl_certificate_key /etc/ssl/private/avivroth.com.key;
- #this no longer includes wp-login because that's being taken care of by common/wpcommon.conf
- location ~/wp-admin {
- location ~ \.php$ {
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_pass php;
- }
- }
- location / {
- return 301 http://$host$request_uri;
- }
- include common/wpcommon.conf;
- include common/locations.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement