Versionsunterschiede von Test Server / Setting Up Virtual Hosts




← Vorherige Änderung





1 The usage of virtual hosts in Apache Configuration((https://httpd.apache.org/docs/2.4/vhosts/ virtual hosts)) in XAMPP is the practice of running more than one web site (that targets local resources) on a single machine.
2
3 {{toc numerate=1}}
4
5 Virtual hosts are IP-based, meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. This practice using Apache2 on OpenSuseXAMPP comes in handy when you want to simulate a production environment (however working in dev environment) locally accessing to your project by a normal URL in the browser.
6
7 To setup a custom virtual host, we need to follow these steps:
8
9 ===Allow virtual hosts===
10
11 By default, XAMPP won't use the ##httpd-vhosts.conf## file (the location of the virtual hosts), therefore we need to indicate that this file will be included during the runtime of Apache.
12
13 **/opt/lampp/etc/httpd.conf**
14 %%# Virtual hosts
54 Start apache and mysql (entire XAMPP).
55 Navigate in your browser to ##~http://myproject/## or ##~http://127.0.0.3/##.
56