Versionsunterschiede von Test Server / Setting Up Virtual Hosts




← Vorherige Änderung





6
7 To setup a custom virtual host, we need to follow these steps:
8
9 ===Allow virtual hosts===
10 By default, Apache2 won't use the ##/etc/apache2/vhosts.d/*.conf## files (the location of the virtual hosts), therefore we need to indicate that this file will be included during the runtime of Apache.
11
12 Once you have installed and checked the status of Apache, go to its Web-root directory and create a new directory as mentioned below.
13 %% cd /srv/www/htdocs/ %%
14
15 %% mkdir mywiki %%
16
17 Create a new file in the above mentioned directory by using the following command.
18
19 %% echo -e '<html>\n<html>\n\t<body>\n\t\t<h1>MyWiki Works!</h1>\n\t</body>\n</html>' > /srv/www/htdocs/mywiki/index.html %%
20
21 ----
22
23
24
25 **/opt/lampp/etc/httpd.conf**
29 %%# Virtual hosts
30 Include etc/extra/httpd-vhosts.conf %%
31
32 ===Weblinks===
33 https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-apache2.html
34
35 ((https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-apache2.html#sec-apache2-configuration-manually-configfiles-etc-apache2))
36 ===Create a custom domain in the hosts file of your system===
37
38 You need to create a custom domain where our apache virtual host will point to. This domain will be normally an ip (127.0.0.xx based) and a custom name.
70 Start apache and mysql (entire XAMPP).
71 Navigate in your browser to ##~http://myproject/## or ##~http://127.0.0.3/##.
72