Skip to content

Instantly share code, notes, and snippets.

@heyost
Last active April 29, 2022 13:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heyost/b9a712f9a112c46ffa3887a550c94c69 to your computer and use it in GitHub Desktop.
Save heyost/b9a712f9a112c46ffa3887a550c94c69 to your computer and use it in GitHub Desktop.
Create dynamic Laravel project vhost on Arch Linux
# Custom vhost laravel wildcard
# enable vhost_alias_module first on httpd.conf
<VirtualHost *:80>
ServerAdmin webmaster@laravel.dev
ServerName laravel.dev
ServerAlias *.laravel.dev
# This will be the wildcarded document root. Any folder you create in /srv/http/php/laravel/* will be automatically a subdomain name.
VirtualDocumentRoot /srv/http/php/laravel/%-3/public
# example work URL:
# if name folder inside laravel root is "test", so working URL is
# http://test.laravel.dev
# For symlinking your projects and htaccesses to work
<Directory /srv/http/php/laravel>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog "/srv/http/php/error/laravel-error.log"
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog "/srv/http/php/error/error_log" common
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment