Created
February 12, 2018 22:55
-
-
Save denmerc/926564d3584fc62c0d32b24368add957 to your computer and use it in GitHub Desktop.
.net core on linux with linux
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
# sudo apt-get install nginx | |
# sudo service nginx start | |
# /etc/nginx/sites-available/default | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://localhost:5000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection keep-alive; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} | |
# sudo nginx -t | |
# sudo nginx -s reload | |
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
# supervisor for restart policy | |
# sudo apt-get install supervisor | |
# /etc/supervisor/conf.d/eg.conf | |
[program:helloworld[ | |
command=/usr/bin/dotnet /var/websites/helloworld/helloworld.dll | |
directory=/var/websites/helloworld | |
autostart=true | |
autorestart=true | |
stderr_logfile=/var/log/helloworld.err.log | |
stdout_logfile=/var/log/helloworld.out.log | |
environment=ASPNETCORE_ENVIRONMENT=Production | |
user=www-data | |
stopsignal=INT | |
# sudo service supervisor stop | |
# sudo service supervisor start | |
# sudo -tail -f /var/log/supervisor/supervisord.log | |
# sudo -tail -f /var/log/helloworld.out.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment