Browse Source

Serveur web existant sur port 80

pull/38/head
fred 2 months ago
parent
commit
4195c15b5d
  1. 46
      www/boris/install.sh

46
www/boris/install.sh

@ -12,7 +12,7 @@ G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PU
IPFSNODEID=$(ipfs id -f='<id>\n')
[[ $(which apache2) ]] && echo "Apache est installé. Le plugin nécessite nginx. EXIT" && exit 1
[[ $(netstat -tan | grep ':10111 ') ]] && echo "Serveur web existant sur port 10111. Installation manuelle recommandée... EXIT" && exit 1
[[ $(netstat -tan | grep ':80 ') ]] && echo "Serveur web existant sur port 80. Installation manuelle recommandée... EXIT" && exit 1
########################################################################
## INSTALL nginx + php + mariadb + ...
@ -29,39 +29,39 @@ ln -s ../ipfs me
## CREATE site config file
printf "
server {
listen 10111 default_server;
listen [::]:10111 default_server;
listen 10111 default_server;
listen [::]:10111 default_server;
root " | sudo tee /etc/nginx/sites-available/tube.copylaradio.com
root " | sudo tee /etc/nginx/sites-available/tube.copylaradio.com
printf root /home/$YOU/.zen/astrXbian/www/boris | sudo tee -a /etc/nginx/sites-available/tube.copylaradio.com
printf ";
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name tube.copylaradio.com;
server_name tube.copylaradio.com;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files \$uri \$uri/ =404;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files \$uri \$uri/ =404;
}
index index.php;
index index.php;
# pass PHP scripts to FastCGI server
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php-fpm.sock;
# With php-cgi (or other tcp sockets):
#fastcgi_pass 127.0.0.1:9000;
}
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php-fpm.sock;
# With php-cgi (or other tcp sockets):
#fastcgi_pass 127.0.0.1:9000;
}
location /ipfs {
proxy_pass http://127.0.0.1:8181;
proxy_set_header Host $host;
@ -73,7 +73,7 @@ printf ";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
" | sudo tee -a /etc/nginx/sites-available/tube.copylaradio.com

Loading…
Cancel
Save