-
-
Save ximik777/04d71d1360ae2044fe7cc7b7e8883b12 to your computer and use it in GitHub Desktop.
OTRS FCGIWRAP SSL+HSTS NGINX configuration
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
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
keepalive_timeout 70; | |
server_name otrs.example.com; | |
root /opt/otrs/var/httpd/htdocs; | |
index index.html; | |
# SSL | |
ssl_certificate /etc/ssl/otrs.example.com.combined.crt; | |
ssl_certificate_key /etc/ssl/otrs.example.com.key; | |
# HSTS | |
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains"; | |
access_log /var/log/nginx/otrs.example.com_access.log; | |
error_log /var/log/nginx/otrs.example.com_error.log; | |
# Redirect naked domain to the customer interface | |
location = / { | |
return 301 https://otrs.example.com/otrs/customer.pl; | |
} | |
# Do not log favicon access | |
location = /favicon.ico { | |
access_log off; | |
log_not_found off; | |
} | |
# Serve static content directly | |
location /otrs-web { | |
gzip on; | |
alias /opt/otrs/var/httpd/htdocs; | |
} | |
# Perl through fciwrap | |
location ~ ^/otrs/(.*\.pl)(/.*)?$ { | |
gzip off; | |
fastcgi_pass unix:/var/run/fcgiwrap.socket; | |
fastcgi_index index.pl; | |
fastcgi_param SCRIPT_FILENAME /opt/otrs/bin/fcgi-bin/$1; | |
include fastcgi.conf; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment