Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If vhosts is properly enabled, edit the /etc/apache2/extra/httpd-vhosts.conf file and add something similar to this:

Code Pro
languagebash
linenumberstrue
<VirtualHost *:80>
    ServerName author.best-comics.net
#    ProxyPass / http://localhost:8080/
#    ProxyPassReverse / http://localhost:8080/
	ProxyPass / ajp://localhost:8009/
    ProxyPassReverse / ajp://localhost:8009/

    ErrorLog "/private/var/log/apache2/projekt.local-error_log"
    CustomLog "/private/var/log/apache2/projekt.local-access_log" common    
</VirtualHost>

...

In summary we need three virtual hosts on Apache - here is the modified httpd-vhosts.conf with one virtual host for the author instance and two for the public instances:

Code Pro
languagetextbash
linenumberstrue
<VirtualHost *:80>
    ServerName author.best-comics.net
	ProxyPass / ajp://localhost:8009/
    ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

<VirtualHost *:80>
    ServerName www.best-comics.net
	ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>

<VirtualHost *:80>
    ServerName www.best-vinyl.net
	ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>

...