Skip to content

Latest commit

 

History

History
74 lines (61 loc) · 1.71 KB

README.md

File metadata and controls

74 lines (61 loc) · 1.71 KB

api server

GitHub license GitHub stars magic
preview

Start

# Shell

$ git clone https://github.com/sssr-dev/api-server.git
  # Cloning repo
$ cd src
$ pip install -r requirements.txt
  # Install all dependents
$ python main.py
  # Start develop server
  

Nginx configuration

server {
    server_name sssr.dev www.sssr.dev;
    listen 80;
    listen 443;
    listen [::]:80;
    listen [::]:443;


    error_page 404 /;

    location / {
        root /var/www/sssr.dev;
        index index.html;
    }
}

server {
    server_name api.sssr.dev;
    listen 80;
    listen 443;
    listen [::]:80;
    listen [::]:443;

    location / {
        proxy_pass http://127.0.0.1:11491/;
        proxy_set_header Ng-Real-Ip $remote_addr;
        proxy_set_header Ng-Real-Hostname $host;    
    }
}
server {
    
    server_name cc.sssr.dev;
    listen 80;
    listen 443;
    listen [::]:80;
    listen [::]:443;
    
    location / {
        proxy_pass http://127.0.0.1:11491/cc?nginx=;   
        proxy_set_header Ng-Real-Ip $remote_addr;
        proxy_set_header Ng-Real-Hostname $host;  
    }
}