Created
March 3, 2025 10:41
-
-
Save shreyans-padmani/b0b89daf50acd6158a24bfbd85913182 to your computer and use it in GitHub Desktop.
live_code_sever
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
udo nano /etc/systemd/system/Aayurveda.service | |
[Unit] | |
Description=.NET 8 App | |
After=network.target | |
[Service] | |
WorkingDirectory=/var/www/Ayurveda/publish | |
ExecStart=/usr/bin/dotnet /var/www/Ayurveda/publish/Ayurveda.dll | |
Restart=always | |
User=www-data | |
Environment=DOTNET_ENVIRONMENT=Production | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
sudo systemctl daemon-reload | |
sudo systemctl enable Ayurveda | |
sudo systemctl start Ayurveda | |
sudo nano /etc/nginx/sites-available/default | |
server { | |
listen 80; | |
server_name Ayurveda.com; | |
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; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
} | |
} | |
sudo systemctl restart nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment