Quantcast
Viewing latest article 15
Browse Latest Browse All 17

Answer by Steini for how to create virtual host on XAMPP

I see two errors:

<VirtualHost *:80> -> Fix to :8081, your POrt the server runs on    ServerName comm-app.local    DocumentRoot "C:/xampp/htdocs/CommunicationApp/public"    SetEnv APPLICATION_ENV "development"<Directory "C:/xampp/htdocs/CommunicationApp/public" -> This is probably why it crashes, missing >        DirectoryIndex index.php        AllowOverride All        Order allow,deny        Allow from all</Directory> -> MIssing close container: </VirtualHost> 

Fixed version:

<VirtualHost *:8081>    ServerName comm-app.local    DocumentRoot "C:/xampp/htdocs/CommunicationApp/public"    SetEnv APPLICATION_ENV "development"<Directory "C:/xampp/htdocs/CommunicationApp/public">        DirectoryIndex index.php        AllowOverride All        Order allow,deny        Allow from all</Directory></VirtualHost>

One thing to mention:

You can always try and run command:

service apache2 configtest

This will tell you when you got a malformed configuration and maybe even can tell you where the problem is.

Furthermore it helps avoid unavailability in a LIVE system:

service apache2 restart

will shutdown and then fail to start, this configtest you know beforehand "oops I did something wrong, I should fix this first" but the apache itself is still running with old configuration. :)


Viewing latest article 15
Browse Latest Browse All 17

Trending Articles