Skip to content

Instantly share code, notes, and snippets.

View zeynsoft's full-sized avatar

Zeynsoft zeynsoft

  • Zeynsoft
  • Mersin
  • Joined Nov 1, 2025
View GitHub Profile
@zeynsoft
zeynsoft / journalctl
Created November 1, 2025 12:50
Monitor systemd service logs
sudo journalctl -u myapi.service -f
@zeynsoft
zeynsoft / dotnetcoreapi.service
Created November 1, 2025 12:36
.NET Core Web API as systemd service on Linux
cd /etc/systemd/system/
sudo nano myapi.service
[Unit]
Description=My API .NET Web API
[Service]
WorkingDirectory=/var/www/myapi.yoursite.com
ExecStart=/usr/bin/dotnet /var/www/myapi.yoursite.com/MYAPI.API.dll --urls="http://localhost:5253" # Set the URL where your API will run
Restart=always
@zeynsoft
zeynsoft / backend.yoursite.com.conf
Created November 1, 2025 12:27
Nginx Reverse Proxy Setup (API/Backend/Docker Apps)
sudo nano backend.yoursite.com
server {
server_name backend.yoursite.com;
location / {
proxy_pass http://localhost:5253; #Replace this ip with your project ip
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@zeynsoft
zeynsoft / example.yoursite.com.conf
Created November 1, 2025 12:20
Nginx configuration setup for Single Page Applications
sudo nano example.yoursite.com
server {
server_name example.yoursite.com;
root /var/www/example.yoursite.com; #Replace this path with your project directory
index index.html;
location / {
try_files $uri $uri/ /index.html;
}