Skip to content

Instantly share code, notes, and snippets.

@TechnologistAU
Created January 21, 2019 04:31
Show Gist options
  • Save TechnologistAU/55624bd1d3209d7a919181b4385f56e4 to your computer and use it in GitHub Desktop.
Save TechnologistAU/55624bd1d3209d7a919181b4385f56e4 to your computer and use it in GitHub Desktop.
123Solar configuration file for nginx on Raspbian (Raspberry Pi)
##
# 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