Last active
August 20, 2019 13:06
-
-
Save luxwarp/d17b247c9a90eaac2bb1d580df330d5a to your computer and use it in GitHub Desktop.
Example Nginx server block config for Vue app.
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
# Example server block config for Vue app. | |
# Author: Mikael Luxwarp Carlsson mikael.m.carlsson@gmail.com | |
# Created: 2019-08-20 | |
# License: ISC | |
server { | |
# What ports should be listened to. | |
listen 80; | |
listen [::]:80; | |
# the path to site web root (eg /var/www/html). | |
root /path/to/vue/project; | |
# name of index files that can be used inside web root. | |
index index.html index.htm; | |
# The urls this config should listen to. | |
server_name example.com www.example.com; | |
# Location block for url | |
location / { | |
try_files $uri /index.html; | |
} | |
# where to store log files. | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment