Created
September 4, 2017 09:54
-
-
Save ngi/c314079f11238d63488302d92a412344 to your computer and use it in GitHub Desktop.
OTRS Config nginx
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 80; | |
listen 443 ssl; | |
server_name support.itsimplycom.it; | |
ssl_protocols TLSv1.2; | |
ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; | |
ssl_prefer_server_ciphers On; | |
ssl_certificate /etc/letsencrypt/live/support.itsimplycom.it/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/support.itsimplycom.it/privkey.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/support.itsimplycom.it/chain.pem; | |
ssl_session_cache shared:SSL:128m; | |
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains"; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
access_log /var/log/nginx/otrs.log; | |
error_log /var/log/nginx/otrs.error; | |
root /opt/otrs/var/httpd/htdocs; | |
index index.html; | |
location ^~ /.well-known/acme-challenge/ { | |
default_type "text/plain"; | |
root /opt/well-known; | |
} | |
if ($scheme = http) { | |
return 301 https://$server_name$request_uri; | |
} | |
location /otrs-web { | |
gzip on; | |
alias /opt/otrs/var/httpd/htdocs; | |
} | |
location ~ ^/otrs/(.*\.pl)(/.*)?$ { | |
fastcgi_pass unix:/var/run/otrs/otrs.cgi.sock; | |
fastcgi_index index.pl; | |
fastcgi_param SCRIPT_FILENAME /opt/otrs/bin/fcgi-bin/$1; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param GATEWAY_INTERFACE CGI/1.1; | |
fastcgi_param SERVER_SOFTWARE nginx; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; | |
fastcgi_param SERVER_PROTOCOL $server_protocol; | |
fastcgi_param REMOTE_ADDR $remote_addr; | |
fastcgi_param REMOTE_PORT $remote_port; | |
fastcgi_param SERVER_ADDR $server_addr; | |
fastcgi_param SERVER_PORT $server_port; | |
fastcgi_param SERVER_NAME $server_name; | |
} | |
} |
Thanks for this but how do I start the
/var/run/otrs/otrs.cgi.sock
socket?
use fcgiwrap with something like that in the init script
FCGI_APP Variables
FCGI_CHILDREN="1"
FCGI_SOCKET="/var/run/otrs/otrs.cgi.sock"
FCGI_USER="www-data"
FCGI_GROUP="www-data"
Socket owner/group (will default to FCGI_USER/FCGI_GROUP if not defined)
FCGI_SOCKET_OWNER="www-data"
FCGI_SOCKET_GROUP="www-data"
sorry but I no longer have the working configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this but how do I start the
/var/run/otrs/otrs.cgi.sock
socket?