Skip to content

Instantly share code, notes, and snippets.

@raultm
Created January 30, 2018 09:47
Show Gist options
  • Save raultm/a175dc74b691ba1b2a1813987ab78de0 to your computer and use it in GitHub Desktop.
Save raultm/a175dc74b691ba1b2a1813987ab78de0 to your computer and use it in GitHub Desktop.
setup_nginx_php7.sh
# 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