Created
July 14, 2021 19:01
-
-
Save rehmatworks/0f9410862bd3ee423753df112a3d55f5 to your computer and use it in GitHub Desktop.
NGINX vhost file.
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 example.com; | |
root /home/user/sites/example; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment