forked from axiom-team/astrXbian
Serveur web existant sur port 80
This commit is contained in:
parent
2e50939e86
commit
4195c15b5d
|
@ -12,7 +12,7 @@ G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PU
|
||||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||||
|
|
||||||
[[ $(which apache2) ]] && echo "Apache est installé. Le plugin nécessite nginx. EXIT" && exit 1
|
[[ $(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 + ...
|
## INSTALL nginx + php + mariadb + ...
|
||||||
|
@ -29,39 +29,39 @@ ln -s ../ipfs me
|
||||||
## CREATE site config file
|
## CREATE site config file
|
||||||
printf "
|
printf "
|
||||||
server {
|
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 root /home/$YOU/.zen/astrXbian/www/boris | sudo tee -a /etc/nginx/sites-available/tube.copylaradio.com
|
||||||
|
|
||||||
printf ";
|
printf ";
|
||||||
|
|
||||||
# Add index.php to the list if you are using PHP
|
# Add index.php to the list if you are using PHP
|
||||||
index index.html index.htm index.nginx-debian.html;
|
index index.html index.htm index.nginx-debian.html;
|
||||||
|
|
||||||
server_name tube.copylaradio.com;
|
server_name tube.copylaradio.com;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file, then
|
# First attempt to serve request as file, then
|
||||||
# as directory, then fall back to displaying a 404.
|
# as directory, then fall back to displaying a 404.
|
||||||
try_files \$uri \$uri/ =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$ {
|
location ~ \.php$ {
|
||||||
include snippets/fastcgi-php.conf;
|
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 {
|
location /ipfs {
|
||||||
proxy_pass http://127.0.0.1:8181;
|
proxy_pass http://127.0.0.1:8181;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
@ -73,7 +73,7 @@ printf ";
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
" | sudo tee -a /etc/nginx/sites-available/tube.copylaradio.com
|
" | sudo tee -a /etc/nginx/sites-available/tube.copylaradio.com
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue