23:05
:42
2020
Wampee and Apache VirtualHost
- Resume:
This tutorial is to enable VirtualHost with Apache with Wampee.
- License:
BSD License
- Copyrights:
Renan Lavarec

This tutorial is to enable VirtualHost with Apache with wampee

This is a way to do it, it is not fully portable for now (you need to modify host file).

Dependencies:

  • Wampee-3.1.0-beta-3.5

Enabling vHost:

Modify "httpd-vhosts.conf" file

Edit the file inside "Wampee-3.1.0-beta-3.5\bin\apache\apache2.4.33\conf\extra\httpd-vhosts.conf"

This file enables to save the virtual host you want to declare.

Adding a alias to the URL "www.tr-softwares.local", will redirect the browser to this directory


<VirtualHost *:80>
    DocumentRoot "${SRVROOT}/../../../www/www.tr-softwares.com/"
    ServerName winnewfun.local
    ServerAlias www.tr-softwares.local
    <Directory  "${SRVROOT}/../../../www/www.tr-softwares.com/">
        AllowOverride All
        Require all granted
    </Directory>

    php_flag display_errors Off
    php_flag log_errors On

    php_value max_upload_size 40M
    php_value max_execution_time 120
    php_value error_log "${SRVROOT}/../../../logs/www.winnewfun.com_phperror.log"
</VirtualHost>

Modify "hosts" file

Edit your host inside Windows to match the url and redirect "tr-softwares.local" to "127.0.0.1" "C:\Windows\System32\drivers\etc\hosts"

4 lines to add to your host file

127.0.0.1 tr-softwares.local
::1 tr-softwares.local
127.0.0.1 www.tr-softwares.local
::1 www.tr-softwares.local

Browse it!

Restart Wampee! (or Restart all services inside the menu)

Open your preferred browser

Enter your url "http://www.tr-softwares.local/"

Et voila !

Magic happens!

Have fun :)