-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Peter Lahanas edited this page Oct 4, 2023
·
1 revision
Welcome to the MemeFaked wiki!
[Unit]
Description=Famefaked Server Service
After=network.target
[Service]
ExecStart=/usr/local/bin/node /opt/server/dist/src/Index.js
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/opt/server/
[Install]
WantedBy=multi-user.target
[Unit]
Description=Famefaked Client Service
After=network.target
[Service]
ExecStart=/usr/bin/npm run start
StandardOutput=syslog
StandardError=syslog
WorkingDirectory=/var/www/client
[Install]
WantedBy=multi-user.target
server {
server_name deco3801-htmlheroes.uqcloud.net;
root /var/www/html;
set $_https '';
set $_scheme http;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Request-URL $request_uri;
}
location /api {
rewrite ^/api(.*)$ $1 break;
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Request-URL $request_uri;
}
#
# If you want for some reason to have plain HTTP requests handled
# by your application server, you can uncomment these directives
# here and remove the location / {} block above.
#
#include "/etc/nginx/set_cookie.conf";
#rewrite_by_lua_file "/usr/share/nginx/lua/auth_filter.lua";
#access_log /var/log/nginx/access.log uq_combined;
#include /etc/nginx/frameworks-enabled/*;
}
server {
listen 443 default_server;
server_name deco3801-htmlheroes.uqcloud.net;
root /var/www/htdocs;
#
# These are needed to make nginx pretend that the request
# was received over HTTPS.
#
port_in_redirect off;
set $_scheme https;
set $_https on;
#
# Activate SSO support
#
include "/etc/nginx/set_cookie.conf";
rewrite_by_lua_file "/usr/share/nginx/lua/auth_filter.lua";
access_log /var/log/nginx/access.log uq_combined;
#
# Deciding which application server backend should handle
# the request is delegated to the enabled "framework" config
# file. These should be symlinks into the frameworks-available
# directory.
#
# It is recommended to use the "webprojctl" to enable and
# disable frameworks.
#
include /etc/nginx/frameworks-enabled/*;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Request-URL $request_uri;
}
location /api {
rewrite ^/api(.*)$ $1 break;
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Request-URL $request_uri;
}
}