more stuff nginx
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
###############################################################################
|
||||
### {{ item['name'] }}
|
||||
###############################################################################
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name solusar.de www.solusar.de;
|
||||
|
||||
location / {
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
|
||||
server_name solusar.de www.solusar.de;
|
||||
|
||||
access_log /var/log/nginx/default-access.log;
|
||||
error_log /var/log/nginx/default-error.log;
|
||||
|
||||
#ssl on;
|
||||
ssl_certificate /etc/letsencrypt/live/www.solusar.de/fullchain.pem;
|
||||
ssl_trusted_certificate /etc/letsencrypt/live/www.solusar.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/www.solusar.de/privkey.pem;
|
||||
|
||||
|
||||
ssl_dhparam /etc/myssl/dh4096.pem;
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK';
|
||||
ssl_session_timeout 5m;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Content-Security-Policy "default-src 'none'; child-src 'self'; connect-src 'self'; img-src 'self' data: https: *.gravatar.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' cdn.jsdelivr.net api.instagram.com pagead2.googlesyndication.com; style-src 'self' 'unsafe-inline' https: fonts.googleapis.com; font-src 'self' data: https: fonts.googleapis.com themes.googleusercontent.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self' www.paypal.com; media-src https:;";
|
||||
|
||||
#limit_req zone=one burst=10;
|
||||
|
||||
root /var/www/vhosts/solusar.de/httpdocs;
|
||||
index index.php;
|
||||
|
||||
include global/restrictions.conf;
|
||||
include global/php.conf;
|
||||
|
||||
location / {
|
||||
# This is cool because no php is touched for static content.
|
||||
# include the "$is_args$args" so non-default permalinks doesn't break when using query string
|
||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
||||
}
|
||||
|
||||
#location /filtron {
|
||||
# root /var/www/vhosts/solusar.de/subdomains/monitor/;
|
||||
# index index.html;
|
||||
#}
|
||||
|
||||
#location ~ \.php$ {
|
||||
# try_files $uri =404;
|
||||
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
# fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||
# fastcgi_index index.php;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
- hosts: scn.21x9.org
|
||||
- hosts: testdummy.realm.local
|
||||
|
||||
tasks:
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
###############################################################################
|
||||
### {{ item['name'] }}
|
||||
###############################################################################
|
||||
|
||||
user www-data;
|
||||
worker_processes 4;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 0;
|
||||
types_hash_max_size 2048;
|
||||
server_tokens off;
|
||||
client_max_body_size 32M;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_protocols TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
# Enabling request time and GEO codes
|
||||
#log_format custom '$remote_addr - $remote_user [$time_local]'
|
||||
# '"$request" $status $body_bytes_sent'
|
||||
# '"$http_referer" "$http_user_agent"'
|
||||
# '"$request_time" "$upstream_connect_time"'
|
||||
# '"$geoip_city" "$geoip_city_country_code"';
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# global access limits
|
||||
##
|
||||
|
||||
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
Reference in New Issue
Block a user