Last active
August 29, 2015 14:01
-
-
Save doapp-ryanp/e3cf994615e2e50fd591 to your computer and use it in GitHub Desktop.
osticket.conf
This file contains hidden or 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 { | |
| server_tokens off; | |
| listen 80 default_server; | |
| server_name tickets.me.com; | |
| client_max_body_size 5M; | |
| keepalive_timeout 0; | |
| fastcgi_read_timeout 120; | |
| fastcgi_send_timeout 60; | |
| root /var/www/osticket/upload; | |
| access_log /var/log/nginx/osticket.access.log; | |
| error_log /var/log/nginx/osticket.error.log; | |
| rewrite_log off; | |
| index index.php index.html; | |
| autoindex off; | |
| gzip on; | |
| gzip_types text/plain text/css application/x-javascript text/javascript application/javascript application/json application/xml text/x-component application/rss+xml text/xml; | |
| sendfile on; | |
| set $path_info ""; | |
| location ~ /include { | |
| deny all; | |
| return 403; | |
| } | |
| if ($request_uri ~ "^/api(/[^\?]+)") { | |
| set $path_info $1; | |
| } | |
| location ~ ^/api/(?:tickets|tasks).*$ { | |
| try_files $uri $uri/ /api/http.php?$query_string; | |
| } | |
| if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") { | |
| set $path_info $1; | |
| } | |
| if ($request_uri ~ "^/ajax.php(/[^\?]+)") { | |
| set $path_info $1; | |
| } | |
| location ~ ^/scp/ajax.php/.*$ { | |
| try_files $uri $uri/ /scp/ajax.php?$query_string; | |
| } | |
| location / { | |
| try_files $uri $uri/ index.php; | |
| } | |
| location ~ \.php$ { | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| include fastcgi_params; | |
| fastcgi_param PATH_INFO $path_info; | |
| fastcgi_intercept_errors on; | |
| } | |
| # Deny access to .htaccess files, | |
| # git & svn repositories, etc | |
| location ~ /(\.ht|\.git|\.svn) { | |
| deny all; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!