2021-12-12 19:14:27 +05:30
|
|
|
|
2022-05-01 14:56:46 +05:30
|
|
|
user root;
|
2021-12-12 19:14:27 +05:30
|
|
|
worker_processes 1;
|
|
|
|
|
|
|
|
error_log logs/error.log;
|
|
|
|
#error_log logs/error.log notice;
|
|
|
|
#error_log logs/error.log info;
|
|
|
|
|
|
|
|
pid logs/nginx.pid;
|
|
|
|
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
http {
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
|
|
# '$status $body_bytes_sent "$http_referer" '
|
|
|
|
# '"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
|
|
|
|
access_log logs/access.log;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
#tcp_nopush on;
|
|
|
|
|
2022-09-27 12:36:47 +05:30
|
|
|
client_max_body_size 50M;
|
|
|
|
|
2021-12-12 19:14:27 +05:30
|
|
|
#keepalive_timeout 0;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
#gzip on;
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
2022-09-12 11:24:50 +05:30
|
|
|
server_name cdc.iitdh.ac.in;
|
2021-12-12 19:14:27 +05:30
|
|
|
|
2022-09-12 11:24:50 +05:30
|
|
|
listen 443 ssl;
|
2021-12-12 19:14:27 +05:30
|
|
|
# server_name localhost;
|
|
|
|
|
2022-09-12 11:24:50 +05:30
|
|
|
ssl_certificate /home/cdc/Desktop/1f9476e3959ebe60.pem;
|
|
|
|
ssl_certificate_key /home/cdc/Desktop/star_iitdh_key.key;
|
2021-12-12 19:14:27 +05:30
|
|
|
|
|
|
|
#charset koi8-r;
|
|
|
|
|
|
|
|
#access_log logs/host.access.log main;
|
2022-09-12 11:24:50 +05:30
|
|
|
|
2021-12-12 19:14:27 +05:30
|
|
|
location / {
|
|
|
|
root /usr/share/nginx/html;
|
2022-09-12 11:24:50 +05:30
|
|
|
try_files $uri $uri/ /portal;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /portal {
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
index index.html;
|
|
|
|
try_files $uri $uri/ /portal/index.html;
|
2021-12-12 19:14:27 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
# Server static files /storage
|
|
|
|
location /storage {
|
2022-05-01 14:56:46 +05:30
|
|
|
alias '/home/gowtham/Gowtham/Projects/cdc-placement-website-backend/CDC_Backend/Storage/';
|
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size on;
|
2021-12-12 19:14:27 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
location /static {
|
2022-05-01 14:56:46 +05:30
|
|
|
autoindex on;
|
|
|
|
autoindex_exact_size on;
|
|
|
|
alias '/home/gowtham/Gowtham/Projects/cdc-placement-website-backend/CDC_Backend/static/';
|
2021-12-12 19:14:27 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
location /api/ {
|
2022-09-12 11:24:50 +05:30
|
|
|
proxy_pass https://localhost:8000;
|
2021-12-12 19:14:27 +05:30
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
}
|
|
|
|
location /admin/ {
|
2022-09-12 11:24:50 +05:30
|
|
|
proxy_pass https://localhost:8000;
|
2021-12-12 19:14:27 +05:30
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#error_page 404 /404.html;
|
|
|
|
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
|
|
#
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /50x.html {
|
|
|
|
root html;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|