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

Commit

Permalink
style(Nginx): Rename Nginx Migration filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Sep 18, 2019
1 parent 007d262 commit 108324e
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 66 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- **Torrent/Search:** Use MySQL fulltext search. (354c07b)
- **ban:** Sync site ban list of username and email in Crontab Jobs (33cc1e6)
- **ban_ips:** Store banned ip in components/Site (01084c9)
- **console:** use adhocore/cli to simple console application (a1bce3a)
- **torrents/tags:** Store torrent tags in TABLE `torrents` (4d573e2)

### Fix
Expand Down
66 changes: 66 additions & 0 deletions migration/ridpt.conf.nginx
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;
}
66 changes: 0 additions & 66 deletions migration/ridpt.nginx.conf

This file was deleted.

0 comments on commit 108324e

Please sign in to comment.