Files
nginx_sites/triton.fet.at/wp.conf
2017-07-23 09:58:08 +02:00

90 lines
2.3 KiB
Nginx Configuration File

# -*-nginx-*-
server {
listen 80;
server_name www.onetufree.at;
# root /srv/pxy/wptriton;
location /.well-known {
root /srv/pxy/onetufree;
allow all;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 80;
listen 443 ssl;
server_name onetufree.at wp.triton.fet.at www.wp.triton.fet.at;
# root /srv/pxy/wptriton;
location /.well-known {
root /srv/pxy/onetufree;
allow all;
}
location / {
return 301 https://www.onetufree.at$request_uri;
}
}
upstream triamp {
server triton-amp.local:8001;
}
server {
listen 443 ssl;
server_name www.onetufree.at;# onetufree.at wp.triton.fet.at www.wp.triton.fet.at;
ssl_certificate /etc/letsencrypt/live/www.onetufree.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.onetufree.at/privkey.pem;
satisfy any;
auth_ldap "Under construction";
auth_ldap_servers fet;
auth_basic "Under construction";
auth_basic_user_file /srv/.passwd;
location /.well-known {
root /srv/pxy/onetufree;
allow all;
}
location / {
# rewrite ^/wp/(.*)$ /$1 break;
# return 301 http://$host$request_uri;
proxy_pass http://triamp;
proxy_set_header Accept-Encoding "";
proxy_set_header Host www.onetufree.at;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X_FORWARDED_SSL on;
proxy_set_header HTTP_X_FORWARDED_SSL on;
proxy_redirect default;
# more_set_headers 'Link: <https://wp.triton.fet.at/index.php/wp-json/>; rel="https://api.w.org/", <https://wp.triton.fet.at/>; rel=shortlink'
# more_set_headers 'Hello: World'
# sub_filter http https;
# sub_filter WordPress WP;
# force https Links
sub_filter http://wp.triton.fet.at https://www.onetufree.at;
sub_filter https://wp.triton.fet.at https://www.onetufree.at;
sub_filter http://www.onetufree.at https://www.onetufree.at;
sub_filter http: https:;
# sub_filter_types text/html;
# sub_filter_types application/javascript, text/javascript, text/html;# application/html text/* application/x-javascript text/xml;
sub_filter_once off;
}
}