Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:configure_a_virtual_host [2018/04/07 16:27] billdozor [Virtual Host Creation] |
linux_wiki:configure_a_virtual_host [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 12: | Line 12: | ||
* server1.example.com (192.168.1.150) -> Perform all connectivity tests from here | * server1.example.com (192.168.1.150) -> Perform all connectivity tests from here | ||
* server2.example.com (192.168.1.151) -> Install Apache Web Server here | * server2.example.com (192.168.1.151) -> Install Apache Web Server here | ||
+ | |||
+ | **Previous Sections Completed** | ||
+ | * [[linux_wiki: | ||
+ | * Except leave listening on port 80/tcp | ||
---- | ---- | ||
Line 20: | Line 24: | ||
\\ | \\ | ||
- | Create virtual host file | + | On server2: |
<code bash> | <code bash> | ||
- | vim / | + | vim / |
< | < | ||
- | | + | |
- | DocumentRoot / | + | ServerName bluesite.example.com |
- | | + | DocumentRoot / |
- | ErrorLog logs/myvhost-error_log | + | |
- | CustomLog logs/myvhost-access_log combined | + | |
+ | ErrorLog logs/bluesite-error_log | ||
+ | CustomLog logs/bluesite-access_log combined | ||
</ | </ | ||
</ | </ | ||
\\ | \\ | ||
- | Create directory and index file for myvhost | + | On server2: |
<code bash> | <code bash> | ||
- | mkdir / | + | mkdir / |
- | echo "The myvhost virtual host index" | + | echo '< |
</ | </ | ||
\\ | \\ | ||
- | Restart httpd | + | On server2: |
<code bash> | <code bash> | ||
systemctl restart httpd | systemctl restart httpd | ||
Line 47: | Line 53: | ||
\\ | \\ | ||
- | Check virtual host site | + | On server1: Create /etc/hosts entry for new name |
+ | <code bash> | ||
+ | vim / | ||
+ | |||
+ | 192.168.1.151 server2 bluesite.example.com | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | On server1: | ||
<code bash> | <code bash> | ||
- | elinks http://myvhost.example.com | + | elinks http://bluesite.example.com |
</ | </ | ||
---- | ---- | ||