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
apt update | |
# Install curl | |
apt install curl -y | |
# Install NVM | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash | |
source ~/.bashrc | |
# Install preffered one | |
nvm install --lts |
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
server { | |
listen 80; | |
server_name epiclabs23.com; | |
access_log /var/log/nginx/epiclabs23.com.log; | |
error_log /var/log/nginx/epiclabs23.com.error.log; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; |
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
# for Ubuntu edit the file ~/.bash_aliases | |
# for Centos / Redhat edit the file ~/.bashrc | |
dex() | |
{ | |
docker exec -it "$1" /bin/bash | |
} | |
alias dps='docker ps' |
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
Header always set Access-Control-Allow-Origin "http://localhost:3000" | |
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" | |
Header always set Access-Control-Max-Age "1000" | |
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" | |
Header always set Access-Control-Allow-Credentials true |
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
sudo yum install epel-release -y | |
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y | |
sudo yum install yum-utils -y | |
sudo yum-config-manager --enable remi-php72 -y | |
sudo yum update -y | |
sudo yum install php72 -y | |
sudo yum install php72-php-bcmath php72-php-ctype php72-php-curl php72-php-dom php72-php-gd php72-php-hash php72-php-iconv php72-php-intl php72-php-mbstring php72-php-openssl php72-php-pdo_mysql php72-php-simplexml php72-php-soap php72-php-xsl php72-php-pecl-zip php72-php-pecl-redis php72-php-fpm php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache -y | |
sudo yum install httpd -y | |
sudo systemctl start httpd | |
sudo systemctl enable httpd |
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
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 5 | |
vcl 4.0; | |
import std; | |
# The minimal Varnish version is 5.0 | |
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https' | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; |
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
#!/bin/bash | |
if [ "$1" == "extra" ]; then | |
start_msg="Starting napa extra" | |
else | |
start_msg="Starting napa" | |
fi | |
echo $start_msg |
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
location /phpmyadmin { | |
root /usr/share/; | |
index index.php index.html index.htm; | |
location ~ ^/phpmyadmin/(.+\.php)$ { | |
try_files $uri =404; | |
root /usr/share/; | |
fastcgi_pass unix:/run/php/php7.2-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; |
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
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/test.loc; | |
# Add index.php to the list if you are using PHP | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name test.loc; |
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
# Only one server block may have `upstream fastcgi_backend` block. | |
# So if you already defined that for some virtual host of your server do not ad that again for other hosts. | |
# In that case only `server` block is required. | |
upstream fastcgi_backend { | |
server unix:/run/php/php7.2-fpm.sock; | |
} | |
server { | |
listen 80; | |
listen [::]:80; |
NewerOlder