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
| As root, set everything under /var/www to httpd_sys_content_t | |
| (sh) # semanage fcontext -a -t httpd_sys_content_t "/var/www(/.*)?" | |
| (sh) # restorecon -R /var/www/ | |
| As root, set everything under /var/virtualenvs to lib_t | |
| (sh) # semanage fcontext -a -t lib_t "/var/virtualenvs(/.*)?" | |
| (sh) # restorecon -R /var/virtualenvs/ | |
| If you want to apply this to a single file, just specify the file, and on restorecon, remove the "-R" |
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
| ###DO NOT USE AS IS, please read the comments### | |
| # Debian based systems | |
| chown -R www-data:dev-ops /var/www/ | |
| chmod -R u+rX-w,g+rwX,o-rwx /var/www/ | |
| # RHEL based |
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 | |
| openssl genrsa -aes256 -passout pass:x -out server.pass.key 2048 | |
| openssl rsa -passin pass:x -in server.pass.key -out server.key | |
| rm server.pass.key | |
| openssl req -new -key server.key -out server.csr | |
| openssl x509 -req -days 30 -in server.csr -signkey server.key -out server.crt |
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
| Check if which vhosts are running: | |
| # httpd -S | |
| Check your version of apache httpd | |
| # httpd -v | |
| If you are running centos, RHEL5,6 or 7, Fedora, remember to put |
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 notes.vandorjw.me | |
| Redirect permanent / https://notes.vandorjw.me | |
| </VirtualHost> | |
| <Virtualhost *:443> | |
| ServerAdmin [email protected] | |
| ServerName notes.vandorjw.me | |
| # indexes + Directory Root, Mandatory but never used. |
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
| # | |
| # -- DJANGO ENVIRONMENT VARIABLES -- | |
| # | |
| . /home/user-name/denvvars | |
| # | |
| # .bashrc | |
| # | |
| export WORKON_HOME=/var/virtualenvs |
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 trunk.vandorjw.me | |
| Redirect permanent / https://trunk.vandorjw.me/ | |
| </VirtualHost> | |
| <Virtualhost *:443> | |
| ServerAdmin admin@xxxxxxxxxxx | |
| ServerName trunk.vandorjw.me | |
| DirectoryIndex index.html |
NewerOlder