Skip to content

Instantly share code, notes, and snippets.

@syoboon77
Created August 24, 2017 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syoboon77/30d3a662460a540173f619f9530ff2c4 to your computer and use it in GitHub Desktop.
Save syoboon77/30d3a662460a540173f619f9530ff2c4 to your computer and use it in GitHub Desktop.
Ubuntu上で作成したhtml.confを半自動で編集するsedスクリプト。「まっさらなVPSからFaucet作るまで頑張るトピック」で使用
# DocumentRootの変更
s/DocumentRoot .*$/DocumentRoot \/vagrant\/myapp\/public/
# VirtualHostディレクティブが閉じられる直前の行に追記
/<\/VirtualHost>/s/^/\n\t<Directory \/vagrant\/myapp\/public\/>\n\t\tOptions FollowSymLinks\n\t\tAllowOverride All\n\t\tRequire all granted\n\t<\/Directory>\n/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment