Created
February 11, 2019 08:05
-
-
Save KevinHonka/22fb36d6c70a1a9c1bec28226cdaf9e5 to your computer and use it in GitHub Desktop.
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; | |
server_name icinga.domain.de; | |
root /usr/share/icingaweb2; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.nginx-debian.html index.php; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
#try_files $uri $uri/ =404; | |
rewrite ^/(.*) http://$server_name/icingaweb2/ permanent; | |
} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
# | |
#location ~ \.php$ { | |
# include snippets/fastcgi-php.conf; | |
# | |
# # With php7.0-cgi alone: | |
# fastcgi_pass 127.0.0.1:9000; | |
# # With php7.0-fpm: | |
# fastcgi_pass unix:/run/php/php7.0-fpm.sock; | |
#} | |
# deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
# | |
#location ~ /\.ht { | |
# deny all; | |
#} | |
location ~ ^/icingaweb2/index\.php(.*)$ { | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi.conf; | |
fastcgi_param SCRIPT_FILENAME /usr/share/icingaweb2/public/index.php; | |
fastcgi_param ICINGAWEB_CONFIGDIR /etc/icingaweb2; | |
fastcgi_param REMOTE_USER $remote_user; | |
} | |
location ~ ^/icingaweb2(.+)? { | |
alias /usr/share/icingaweb2/public; | |
index index.php; | |
try_files $1 $uri $uri/ /icingaweb2/index.php$is_args$args; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment