Created
January 30, 2018 09:47
setup_nginx_php7.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Nginx & PHP7 | |
## (https://www.digitalocean.com/community/tutorials/como-instalar-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04-es) | |
# Actualizamos los repos de apt | |
sudo apt-get update | |
# Instalamos Nginx | |
sudo apt-get install nginx | |
# Si usas ufw firewall dar acceso | |
echo "Si usas ufw ejecuta -> sudo ufw allow 'Nginx HTTP'" | |
echo "Tras hacerlo puedes comprobar con -> sudo ufw status" | |
# Instalamos PHP | |
sudo apt-get install php-fpm | |
# Configurar Nginx para funcionar con PHP | |
echo "Necesitar editar el archivo -> sudo nano /etc/nginx/sites-available/default" | |
echo "Así es como está tras instalación https://gist.githubusercontent.com/raultm/a2f7e1d7b829eb72aee0df2d13fc4597/raw/a2f203f614fd47a5b19c95ebd259cf279a24d27f/ngingx_default.conf" | |
echo "Así es como debe estar para funcionar con php https://gist.githubusercontent.com/raultm/a2f7e1d7b829eb72aee0df2d13fc4597/raw/a2f203f614fd47a5b19c95ebd259cf279a24d27f/nginx_default_with_php.conf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment