Last active
January 20, 2019 02:21
-
-
Save TechnologistAU/8376fdb8260e9e09d8aff8b8a2a5fae1 to your computer and use it in GitHub Desktop.
123Solar & meterN 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 & meterN configuration file for nginx on Raspbian (Raspberry Pi) | |
## | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name _; | |
root /var/www/html; | |
index index.php index.htm index.html; | |
## | |
# Only allow these request methods | |
## | |
if ($request_method !~ ^(GET|HEAD|POST)$ ) { | |
return 444; | |
} | |
## | |
# HTTP Authentication for 123Solar - do not uncomment until instructed | |
## | |
#location /123solar/admin { | |
# index index.php; | |
# auth_basic "Restricted"; | |
# auth_basic_user_file /var/www/html/123solar/config/.htpasswd; | |
#} | |
## | |
# HTTP Authentication for meterN - do not uncomment until instructed | |
## | |
#location /metern/admin { | |
# index index.php; | |
# auth_basic "Restricted"; | |
# auth_basic_user_file /var/www/html/metern/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