Skip to content

Instantly share code, notes, and snippets.

@roberto-butti
Created February 14, 2021 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberto-butti/d0e135d18cbe079200325c97cbfcd5df to your computer and use it in GitHub Desktop.
Save roberto-butti/d0e135d18cbe079200325c97cbfcd5df to your computer and use it in GitHub Desktop.
Virtual Domain configuration in /etc/nginx/sites-available/
server {
listen 80;
listen [::]:80;
# SSL configuration
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
# Set root directive with your /public Laravel directory
root /var/www/ghygen.hi-folks.dev/htdocs/public;
# Set index directive with index.php
index index.php;
# Set server_name directive with the hostname
server_name ghygen.hi-folks.dev;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment