Created
September 7, 2016 15:02
-
-
Save sseidenthal/1506b7736cd1880862923ee12c07abe3 to your computer and use it in GitHub Desktop.
NGINX, Symfony 2 with SimpleSamlPhp as Alias
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 { | |
server_name default; | |
root /var/www/symfony/web; | |
client_max_body_size 100M; | |
fastcgi_read_timeout 1800; | |
location / { | |
try_files $uri @rewriteapp; | |
} | |
location ^~ /simplesaml { | |
alias /var/www/simplesamlphp/www; | |
index index.php; | |
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ { | |
include fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_param SCRIPT_FILENAME $document_root$phpfile; | |
fastcgi_param PATH_INFO $pathinfo if_not_empty; | |
} | |
} | |
location @rewriteapp { | |
rewrite ^(.*)$ /app_dev.php$1 last; | |
} | |
location ~ ^/(app|app_dev|config)\.php(/|$) { | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
} | |
} |
thank you it saves me my day
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put your symfony code in: /var/www/symfony/
put simplesamlphp in: /var/www/simplesamlphp/