-
-
Save sakukode/1a8d86f5495ca7915fd00effc5a8881d to your computer and use it in GitHub Desktop.
Set up Automatic Virtual Hosts with Nginx
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
#/etc/nginx/sites-available/default | |
server { | |
listen 80; | |
server_name ~^(www\.)?(?<sname>.+?).dev$; | |
root /home/mokhamad/html/suit/$sname/public; | |
location ~ /.well-known { | |
allow all; | |
} | |
# ssl_certificate /etc/letsencrypt/live/servername.com/fullchain.pem; | |
# ssl_certificate_key /etc/letsencrypt/live/servername.com/privkey.pem; | |
access_log /var/log/nginx/$sname.access.log; | |
error_log /var/log/nginx/suitdev.error.log; | |
include /etc/nginx/index.php.conf; | |
#include /etc/nginx/ssl.conf; | |
} |
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
#/etc/hosts | |
127.0.0.1 localhost | |
127.0.0.1 *.dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment