Hi,

i have an issue with virtualhost.
i have 2 local websites that i need to work on. I use XAMPP 7.3 under
Kubuntu 19.04.
All code is located under /opt/lampp/htdocs.

when i try to get access to http://test1.dev website, browser redirect me
to XAMPP default directory and display its content.

here is my httpd-vhosts.conf file:
<VirtualHost *:80>
    DocumentRoot "/opt/lampp/htdocs/test1.dev"
    ServerName test1.dev
    ServerAlias www.test1.dev
   <Directory "/opt/lampp/htdocs/test1.dev">
      Options Indexes FollowSymLinks Includes ExecCGI
           AllowOverride None
           Require all granted
   </Directory>
    ErrorLog "logs/test1.dev-error_log"
    CustomLog "logs/test1.dev-access_log" common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/opt/lampp/htdocs"
    ServerName localhost
    ServerAlias 127.0.0.1
   <Directory "/opt/lampp/htdocs">
      Options Indexes FollowSymLinks Includes ExecCGI
           AllowOverride None
           Require all granted
   </Directory>
    ErrorLog "logs/localhost-error_log"
    CustomLog "logs/localhost-access_log" common
</VirtualHost>


in hosts file i setup:
127.0.0.1 test1.dev
127.0.0.1 test2.dev
127.0.0.1 localhost

If i check the list of virtualhost this is what i get (apachectl -S):

VirtualHost configuration:
ServerRoot: "/opt/lampp"
Main DocumentRoot: "/opt/lampp/htdocs"
Main ErrorLog: "/opt/lampp/logs/error_log"
Mutex default: dir="/opt/lampp/logs/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ldap-cache: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/opt/lampp/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODPERL2
User: name="daemon" id=1
Group: name="daemon" id=1

Where is my mistake ?
thx

-- 
Alain
-----------------------------------------------------------
Kubuntu 19.04
MySQL 5.7.x
Apache 2.4.25 / OpenSSL 1.0.2j
Tomcat 7.17
PHP 7.3.x

Reply via email to