Created
June 30, 2018 21:49
-
-
Save jclishman/3b33403dda172776856d95620baf6451 to your computer and use it in GitHub Desktop.
Set up website
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
- Registrar - | |
1. Buy namecheap domain | |
2. ns1.digitalocean.com, ns2, ns3 or custom nameservers | |
- Digital Ocean - | |
3. Add domain to DO | |
4. Add ipv4 to A record, use @ | |
5. Add ipv6 to AAAA record, use @ | |
6. Add CNAME, have www.domain.tld redirect to domain.tld | |
- SSH - | |
7. mkdir /var/www/domain | |
8. rm -rf html/ | |
9. move web files to /var/www/domain | |
10. fuck with permissions | |
11. duplicate default in /etc/nginx/sites-available, rename to domain | |
12. change duplicated default to: | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name <domain>; | |
root <directory>; | |
index index.html; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
} | |
13. add symlink from sites-available to sites-available | |
ln -s /etc/nginx/sites-available/domain /etc/nginx/sites-enabled/domain | |
14. nginx -t (test) | |
15. systemctl reload nginx |
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
- Registrar - | |
1. Buy namecheap domain | |
2. ns1.digitalocean.com, ns2, ns3 or custom nameservers | |
- Digital Ocean - | |
3. Add domain to DO | |
4. Add ipv4 to A record, use @ | |
5. Add ipv6 to AAAA record, use @ | |
6. Add CNAME, have www.domain.tld redirect to domain.tld | |
- SSH - | |
7. mkdir /var/www/domain | |
8. rm -rf html/ | |
9. move web files to /var/www/domain | |
10. fuck with permissions | |
11. duplicate default in /etc/nginx/sites-available, rename to domain | |
12. change duplicated default to: | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name <domain>; | |
root <directory>; | |
index index.html; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
} | |
13. add symlink from sites-available to sites-available | |
ln -s /etc/nginx/sites-available/domain /etc/nginx/sites-enabled/domain | |
14. nginx -t (test) | |
15. systemctl reload nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment