Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
docs(Migration): Update Nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed May 29, 2019
1 parent ff6351d commit 900c999
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions migration/ridpt.nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ server
{
listen 80;
#listen [::]:80;
server_name ridpt.rhilip.info ;
server_name ridpt.top ridpt.rhilip.info;
index index.html index.htm index.php default.html default.htm default.php;
root /data/wwwroot/ridpt.rhilip.info/apps/public/;
root /data/wwwroot/ridpt.top/apps/public/;

#error_page 404 /404.html;

# Deny access to PHP files in specific directory
location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

# Don't Log the access log of robots.txt
location = /robots.txt { allow all; log_not_found off; access_log off; }

location = / {
rewrite ^(.*)$ /index last;
}
Expand All @@ -27,24 +30,23 @@ server
}
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}

location ~ .*\.(js|css)?$
{
expires 12h;
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}

location ~ /.well-known {
allow all;
}

location ~ /\.
{
location ~ /\.ht {
deny all;
}

access_log /data/wwwlogs/ridpt.rhilip.info.log;
access_log /data/wwwlogs/ridpt.top.log;
}

0 comments on commit 900c999

Please sign in to comment.