简体   繁体   中英

Setting up virtual host on XAMPP

I've installed XAMPP on Ubuntu in '/opt/lampp' directory and would like to set up some VirtualHosts. Apache Virtual Host tutorial instructs to place

<VirtualHost *:80>
...
</VirtualHost>

code in '/etc/apache2/sites-available/[virtualhostname].conf'. The problem is that I don't have 'apache2' folder in '/etc'. I also don't have 'sites-available' directory in '/opt/lampp/apache2'.

I have '/opt/lampp/etc/httpd.conf' and '/opt/lampp/etc/extra/httpd-vhosts.conf' files though. Which ones shall I use to set the VH up?

您应该使用/opt/lampp/etc/extra/httpd-vhosts.conf ,但在将服务器名称添加到.hosts文件并取消注释/opt/lampp/etc/httpd.conf包含httpd-vhosts.conf /opt/lampp/etc/httpd.conf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM