Created
May 7, 2018 11:41
-
-
Save dotancohen/3364affc03a805032f013356973d9ea4 to your computer and use it in GitHub Desktop.
Output URLs of the website whose DOCUMENT_ROOT is the current directory.
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
# Output URLs of the website whose DOCUMENT_ROOT is the current directory. | |
# Reads from hosts file and Apache config | |
alias localurl='grep "$(grep -r -C3 $(pwd) /etc/httpd/vhost.d/ | grep -ioP "servername(.*)|serveralias(.*)" | awk '\''{print $2}'\'')" /etc/hosts | awk '\''{print $2}'\'' ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment