Last active
December 26, 2015 03:19
-
-
Save autermann/7085035 to your computer and use it in GitHub Desktop.
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
| worker_processes 2; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| upstream tomcat { | |
| server 127.0.0.1:8080 fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| return 301 https://$host$request_uri; | |
| } | |
| server { | |
| listen 443; | |
| server_name turanga; | |
| root /srv/http/master; | |
| ssl on; | |
| ssl_session_timeout 5m; | |
| ssl_protocols SSLv2 SSLv3 TLSv1; | |
| ssl_ciphers HIGH:!aNULL:!MD5; | |
| ssl_prefer_server_ciphers on; | |
| ssl_certificate ssl/server.crt; | |
| ssl_certificate_key ssl/server.key; | |
| index index.php index.html index.htm; | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| location = /robots.txt { | |
| access_log off; | |
| log_not_found off; | |
| } | |
| location = /favicon.ico { | |
| access_log off; | |
| log_not_found off; | |
| } | |
| location ~ /\. { | |
| return 404; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri = 404; | |
| fastcgi_pass unix:/run/php-fpm/php-fpm.sock; | |
| fastcgi_index index.php; | |
| include fastcgi.conf; | |
| } | |
| location /api/stable { | |
| include tomcat.conf; | |
| } | |
| location /api/dev { | |
| include tomcat.conf; | |
| } | |
| location /manager { | |
| include tomcat.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
| <?xml version='1.0' encoding='utf-8'?> | |
| <Server port="8005" shutdown="SHUTDOWN"> | |
| <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> | |
| <Listener className="org.apache.catalina.core.JasperListener" /> | |
| <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> | |
| <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> | |
| <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> | |
| <GlobalNamingResources> | |
| <Resource name="UserDatabase" | |
| auth="Container" | |
| type="org.apache.catalina.UserDatabase" | |
| description="User database that can be updated and saved" | |
| factory="org.apache.catalina.users.MemoryUserDatabaseFactory" | |
| pathname="conf/tomcat-users.xml" /> | |
| </GlobalNamingResources> | |
| <Service name="Catalina"> | |
| <Connector port="8080" | |
| protocol="HTTP/1.1" | |
| connectionTimeout="20000" | |
| redirectPort="8443" | |
| proxyPort="443" | |
| scheme="https"/> | |
| <Connector port="8009" | |
| protocol="AJP/1.3" | |
| redirectPort="8443" /> | |
| <Engine name="Catalina" | |
| defaultHost="localhost"> | |
| <Realm resourceName="UserDatabase" | |
| className="org.apache.catalina.realm.UserDatabaseRealm" /> | |
| <Host name="localhost" | |
| appBase="webapps" | |
| unpackWARs="true" | |
| autoDeploy="true" | |
| xmlValidation="false" | |
| xmlNamespaceAware="false" /> | |
| </Engine> | |
| </Service> | |
| </Server> |
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
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_redirect off; | |
| proxy_connect_timeout 240; | |
| proxy_send_timeout 240; | |
| proxy_read_timeout 240; | |
| proxy_pass http://tomcat; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment