File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ ## hashbang nginx user configuration template
2+ ## This is a simplified configuration, just to serve ~/Public
3+
4+ worker_processes 1;
5+ error_log stderr;
6+ pid /home/${USER}/.nginx.pid;
7+
8+ events {
9+ worker_connections 1024;
10+ }
11+
12+ http {
13+ include /etc/nginx/mime.types;
14+ default_type application/octet-stream;
15+
16+ sendfile on;
17+
18+ keepalive_timeout 65;
19+
20+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
21+ ssl_prefer_server_ciphers on;
22+ access_log stdout;
23+ server {
24+ listen unix:/home/${USER}/.nginx.sock;
25+ server_name ${USER}.de1.hashbang.sh;
26+
27+ location / {
28+ root /home/${USER}/Public;
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ ## Hashbang nginx user service template
2+
3+ [Unit]
4+ Description =A high performance web server and a reverse proxy server
5+ Documentation =man:nginx(8)
6+
7+ [Service]
8+ ExecStartPre =/bin/sh -c '/usr/bin/envsubst < %h/.config/nginx/nginx.conf.template > %h/.config/nginx/nginx.conf'
9+ ExecStartPre =-/usr/bin/rm %h/.nginx.sock
10+ ExecStart =/usr/sbin/nginx -g 'daemon off; master_process on;' -p %h/.config/nginx -c nginx.conf
11+ ExecStartPost =-/usr/bin/rm %h/.nginx.sock
12+ Restart =always
13+
14+ [Install]
15+ WantedBy =default.target
You can’t perform that action at this time.
0 commit comments