intial commit
This commit is contained in:
54
nginx-conf/nginx.conf
Normal file
54
nginx-conf/nginx.conf
Normal file
@ -0,0 +1,54 @@
|
||||
# nginx.conf
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name yourls.localhost;
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
|
||||
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 Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
|
||||
try_files $uri $uri/ @rewrite;
|
||||
location @rewrite {
|
||||
rewrite ^/([\w-]+\+?)/?$ /yourls-loader.php?id=$1 last;
|
||||
}
|
||||
|
||||
location /. {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass devaltogether_yourls_fpm:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off; access_log off;
|
||||
}
|
||||
location = /robots.txt {
|
||||
log_not_found off; access_log off; allow all;
|
||||
}
|
||||
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
}
|
54
nginx-conf/nginx.conf.dummy
Normal file
54
nginx-conf/nginx.conf.dummy
Normal file
@ -0,0 +1,54 @@
|
||||
# nginx.conf
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name PROJECTURL;
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
|
||||
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 Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
|
||||
try_files $uri $uri/ @rewrite;
|
||||
location @rewrite {
|
||||
rewrite ^/([\w-]+\+?)/?$ /yourls-loader.php?id=$1 last;
|
||||
}
|
||||
|
||||
location /. {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass PROJECTNAME_yourls_fpm:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off; access_log off;
|
||||
}
|
||||
location = /robots.txt {
|
||||
log_not_found off; access_log off; allow all;
|
||||
}
|
||||
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user