-
-
Save maksimize/8d206e0ad5a3f2e98b6d to your computer and use it in GitHub Desktop.
PHP7
This file contains 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
#!/bin/bash | |
#sudo chmod +x install.sh | |
#install essential apps | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get --assume-yes install git curl nginx | |
#install php7 | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-mcrypt php7.0-mbstring php7.0-xml |
This file contains 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
#/etc/nginx/sites-enabled/default | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /home/ubuntu/laravel/public/; | |
index index.php index.html index.htm; | |
server_name localhost; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment