Instantly share code, notes, and snippets.

Embed
What would you like to do?
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