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 abc.com; | |
location / { | |
proxy_pass http://localhost:2222; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $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
server { | |
server_name abc.com; | |
listen 80; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
root /home/app/html-app/dist; | |
index index.html index.htm; |
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 { | |
server_name abc.com; | |
return 301 http://xyz.com; | |
} | |
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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot /home/app/php-app | |
ServerAlias www.abc.com | |
ServerName abc.com | |
<Directory /home/app/php-app> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride all | |
Order allow,deny |
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 { | |
server_name staging.io; | |
listen 80; | |
access_log /var/log/nginx/staging.io.access.log; | |
error_log /var/log/nginx/staging.io.error.log; | |
root /home/app/snap-ui/dist; | |
index index.html index.htm; |
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 default_server; | |
listen [::]:80 default_server; | |
server_name example.com; | |
return 301 https://$server_name$request_uri; | |
} |
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
<VirtualHost *:80> | |
ServerName example.com | |
Redirect 301 "/" "https://www.example.com/" | |
</VirtualHost> |
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
NameVirtualHost *:443 | |
<VirtualHost *:443> | |
ServerName www.example.com | |
DocumentRoot /var/www | |
DirectoryIndex index.php | |
#DirectoryIndex index.html index.htm | |
SSLEngine on | |
SSLCertificateFile /home/ubuntu/.crypto/www_example_com.crt | |
SSLCertificateKeyFile /home/ubuntu/.crypto/www_example_com.key |
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 | |
DB_DIR='file-dumps' | |
rsync -avz DB_DIR app@ip_address:/home/app/backup | |
echo "Dump has been synced successfully at $(date)" >> /tmp/dump_cron_log.txt |
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
/* | |
//Literal way | |
var car = { | |
color:'black', | |
make: 'Audi', | |
model: 'A5', | |
move: function() { | |
return 'It is moving'; | |
}, |