-
-
Save rherrick/3775ccc5dd93c7ca457f to your computer and use it in GitHub Desktop.
nginx conf for ldap php app and xnatdev Tomcat app
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 { | |
listen ldap.wurstworks.com:80; | |
server_name ldap.wurstworks.com; | |
root /tmp/test | |
index index.php index.html index.htm; | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
# deny access to .htaccess files | |
location ~ /\.ht { | |
deny all; | |
} | |
# log_format compression '$remote_addr - $remote_user [$time_local] ' | |
# '"$request" $status $body_bytes_sent ' | |
# '"$http_referer" "$http_user_agent"'; | |
access_log /tmp/test/access.log | |
error_log /tmp/test/error.log warn; | |
} |
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 { | |
listen xnatdev.wurstworks.com:80; | |
server_name xnatdev.wurstworks.com; | |
location / { | |
root /var/lib/tomcat7/webapps/xnat; | |
proxy_pass http://localhost:8080; | |
proxy_redirect http://localhost:8080 $scheme://xnatdev; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_connect_timeout 150; | |
proxy_send_timeout 100; | |
proxy_read_timeout 100; | |
proxy_buffers 4 32k; | |
client_max_body_size 0; | |
client_body_buffer_size 128k; | |
} | |
} |
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 { | |
listen xnatdev.wurstworks.com:80; | |
server_name xnatdev.wurstworks.com; | |
location / { | |
root /var/lib/tomcat7/webapps/xnat; | |
proxy_pass http://localhost:8080; | |
proxy_redirect http://localhost:8080 $scheme://xnatdev; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_connect_timeout 150; | |
proxy_send_timeout 100; | |
proxy_read_timeout 100; | |
proxy_buffers 4 32k; | |
client_max_body_size 0; | |
client_body_buffer_size 128k; | |
} | |
location /ldap/ { | |
root /usr/share/phpldapadmin/htdocs; | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} | |
location /test/ { | |
root /tmp/test; | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment