first commit
This commit is contained in:
commit
fad3139c68
7 changed files with 198 additions and 0 deletions
42
README.md
Normal file
42
README.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
# NGINX
|
||||
|
||||
installare con il volume /home/nvme/dockerdata/nginx:/etc/nginx1
|
||||
|
||||
```docker-compose
|
||||
services:
|
||||
mynginx:
|
||||
image: nginx
|
||||
restart: always
|
||||
volumes:
|
||||
- /home/nvme/dockerdata/nginx/html:/usr/share/nginx/html:ro
|
||||
- /home/nvme/dockerdata/nginx:/etc/nginx1 #da modificare senza l'1 dopo aver copiato tutto
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
networks:
|
||||
- fabio
|
||||
|
||||
networks:
|
||||
fabio:
|
||||
external: true
|
||||
```
|
||||
|
||||
entrare nel bash del docker e copiare tutto /etc/nginx in /etc/nginx1
|
||||
```bash
|
||||
cp -R /etc/nginx in /etc/nginx1
|
||||
```
|
||||
|
||||
uscire dal docker
|
||||
|
||||
stoppare il docker
|
||||
|
||||
modificare la riga del docker-compose togliendo l'1
|
||||
```docker-compose
|
||||
/home/nvme/dockerdata/nginx:/etc/nginx
|
||||
```
|
||||
|
||||
far ripartire il docker
|
||||
|
||||
in /home/nvme/dockerdata/nginx/conf.d iserire i vari files di config
|
||||
|
||||
|
45
conf.d_files/default.conf
Normal file
45
conf.d_files/default.conf
Normal file
|
@ -0,0 +1,45 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name patachina.casacam.net;
|
||||
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
#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 /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
19
conf.d_files/forgejo.conf
Normal file
19
conf.d_files/forgejo.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
server {
|
||||
listen 80; # Listen on IPv4 port 80
|
||||
listen [::]:80; # Listen on IPv6 port 80
|
||||
|
||||
server_name forgit.patachina.casacam.net; # Change this to the server domain name.
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:3100; # Port 3000 is the default Forgejo port
|
||||
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
}
|
22
conf.d_files/forgejossl.conf
Normal file
22
conf.d_files/forgejossl.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
server_name forgit.patachina.casacam.net; # Change this to the server domain name.
|
||||
|
||||
ssl_certificate ssl/live/npm-9/fullchain1.pem;
|
||||
ssl_certificate_key ssl/live/npm-9/privkey1.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:3100; # Port 3000 is the default Forgejo port
|
||||
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
}
|
29
conf.d_files/ha.conf
Normal file
29
conf.d_files/ha.conf
Normal file
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
#listen 443 ssl;
|
||||
listen 80;
|
||||
server_name ha.patachina.casacam.net;
|
||||
|
||||
#ssl on;
|
||||
#ssl_certificate /etc/nginx/ssl/home.example.org/home.example.org-bundle.crt;
|
||||
#ssl_certificate_key /etc/nginx/ssl/home.example.org/home.example.org.key;
|
||||
#ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:8123;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /api/websocket {
|
||||
proxy_pass http://192.168.1.4:8123/api/websocket;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
}
|
||||
}
|
19
conf.d_files/portainer.conf
Normal file
19
conf.d_files/portainer.conf
Normal file
|
@ -0,0 +1,19 @@
|
|||
server {
|
||||
listen 80; # Listen on IPv4 port 80
|
||||
listen [::]:80; # Listen on IPv6 port 80
|
||||
|
||||
server_name portainer.patachina.casacam.net; # Change this to the server domain name.
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:9000; # Port 3000 is the default Forgejo port
|
||||
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
}
|
22
conf.d_files/portainerssl.conf
Normal file
22
conf.d_files/portainerssl.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
server_name portainer.patachina.casacam.net; # Change this to the server domain name.
|
||||
|
||||
ssl_certificate ssl/live/npm-9/fullchain1.pem;
|
||||
ssl_certificate_key ssl/live/npm-9/privkey1.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://192.168.1.4:9000; # Port 3000 is the default Forgejo port
|
||||
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue