Last active
August 25, 2019 18:03
-
-
Save ilhamarrouf/f609ba54c0002415060b8178b3b00583 to your computer and use it in GitHub Desktop.
example virtual host php
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
| server { | |
| listen 80; | |
| server_name example.com; | |
| index index.php; | |
| root /path/to/public; | |
| location / { | |
| try_files $uri /index.php$is_args$args; | |
| } | |
| location ~ \.php { | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
| fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
| fastcgi_index index.php; | |
| fastcgi_pass 127.0.0.1:9000; | |
| } | |
| } |
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
| server { | |
| listen 8001; | |
| server_name example2.com; | |
| index index.html; | |
| root /path/to/public; | |
| location / { | |
| try_files $uri /index.html$is_args$args; | |
| } | |
| location ~ \.html { | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.html)(/.+)$; | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
| fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
| fastcgi_index index.html; | |
| fastcgi_pass 127.0.0.1:9000; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment