Skip to content

Instantly share code, notes, and snippets.

@Vitexus
Created November 29, 2015 09:43
Show Gist options
  • Save Vitexus/6c780ff77fb385c26fad to your computer and use it in GitHub Desktop.
Save Vitexus/6c780ff77fb385c26fad to your computer and use it in GitHub Desktop.
List URLs of enabled nginx sites
#!/bin/sh
cat /etc/nginx/sites-enabled/* | grep server_name | awk '{ print "http://"$2 }' | sort | uniq | sed "s/;/\//"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment