Created
January 21, 2019 04:31
-
-
Save TechnologistAU/55624bd1d3209d7a919181b4385f56e4 to your computer and use it in GitHub Desktop.
123Solar configuration file for nginx on Raspbian (Raspberry Pi)
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
## | |
# 123Solar configuration file for nginx on Raspbian (Raspberry Pi) | |
## | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name _; | |
root /var/www/html/123solar; | |
index index.php index.htm index.html; | |
## | |
# Only allow these request methods | |
## | |
if ($request_method !~ ^(GET|HEAD|POST)$ ) { | |
return 444; | |
} | |
## | |
# HTTP Authentication - do not uncomment until instructed | |
## | |
#location /admin { | |
# index index.php; | |
# auth_basic "Restricted"; | |
# auth_basic_user_file /var/www/html/123solar/config/.htpasswd; | |
#} | |
## | |
# Pass the PHP scripts to FastCGI server using FPM/Unix sockets | |
## | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
} | |
## | |
# deny access to all .ht* files (.htaccess, .htpasswd, etc) if Apache's | |
# document root concurs with nginx's one | |
## | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment