Created
November 27, 2019 22:49
-
-
Save kastaneda/4e028a961ee97f542f942afa638ae94b to your computer and use it in GitHub Desktop.
Local Apache
This file contains 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
# /etc/apache2/sites-available/000-default.conf | |
<IfModule mod_vhost_alias.c> | |
<VirtualHost *:80> | |
# Mass virtual hosting | |
ServerAlias * | |
UseCanonicalName Off | |
VirtualDocumentRoot "/var/www/vhosts/%0" | |
# Logs | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log vcommon | |
</VirtualHost> | |
</IfModule> | |
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
This file contains 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
apt install apache2 php7.2-fpm | |
a2enmod vhost_alias | |
a2enmod proxy_fcgi | |
a2enconf php7.2-fpm |
This file contains 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
$ ls -l /var/www/vhosts/ | |
lrwxrwxrwx 1 root root 16 Mar 16 01:02 127.0.0.1 -> /home/gray/code/ | |
lrwxrwxrwx 1 root root 16 Mar 16 01:03 localhost -> /home/gray/code/ | |
lrwxrwxrwx 1 root root 24 Mar 16 00:32 sandbox.localhost -> /home/gray/code/sandbox/ | |
lrwxrwxrwx 1 root root 36 Mar 16 00:16 test.localhost -> /home/gray/code/test.de.co.ua/_site/ | |
$ host anythingyoutype.localhost | |
anythingyoutype.localhost has address 127.0.0.1 | |
anythingyoutype.localhost has IPv6 address ::1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment