This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(Nginx): Rename Nginx Migration filename
- Loading branch information
Showing
3 changed files
with
67 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
server | ||
{ | ||
listen 80; | ||
#listen [::]:80; | ||
server_name ridpt.top ridpt.rhilip.info; | ||
index index.html index.htm index.php default.html default.htm default.php; | ||
root /data/wwwroot/ridpt.top/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 or favicon.ico | ||
location = /robots.txt { allow all; log_not_found off; access_log off; } | ||
location = /favicon.ico { allow all; log_not_found off; access_log off; } | ||
|
||
# security headers | ||
#add_header X-Frame-Options "SAMEORIGIN" always; | ||
#add_header X-XSS-Protection "1; mode=block" always; | ||
#add_header X-Content-Type-Options "nosniff" always; | ||
#add_header Referrer-Policy "no-referrer-when-downgrade" always; | ||
#add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always; | ||
#add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; | ||
|
||
location = / { | ||
rewrite ^(.*)$ /index last; | ||
} | ||
|
||
location / { | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection "keep-alive"; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header Scheme $scheme; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
if (!-e $request_filename) { | ||
proxy_pass http://127.0.0.1:9501; | ||
} | ||
} | ||
|
||
# assets, media | ||
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ { | ||
expires 7d; | ||
access_log off; | ||
} | ||
|
||
# svg, fonts | ||
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ { | ||
add_header Access-Control-Allow-Origin "*"; | ||
expires 7d; | ||
access_log off; | ||
} | ||
|
||
# ACME-challenge | ||
location ~ /.well-known { | ||
allow all; | ||
} | ||
|
||
# . files | ||
location ~ /\.(?!well-known) { | ||
deny all; | ||
} | ||
|
||
access_log /data/wwwlogs/ridpt.top.log; | ||
} |
This file was deleted.
Oops, something went wrong.