Versionsunterschiede von Test Server / Setting Up Virtual Hosts
16 | 16 | |
---|---|---|
17 | 17 | Create a new file in the above mentioned directory by using the following command. |
18 | 18 | |
19 |
%% echo -e '<html>\n<html>\n\t<body>\n\t\t<h1> |
|
19 | %% echo -e '<html>\n<html>\n\t<body>\n\t\t<h1>Welcome World!</h1>\n\t</body>\n</html>' > /srv/www/htdocs/myproject/index.html %% | |
20 | 20 | |
21 | 21 | Create a new virtualhost configuration file in the below mentioned directory and configure it as follows. |
22 | 22 | |
23 | 23 | /etc/apache2/conf.d/vhost.conf |
24 | 24 | |
25 | 25 | %% sudo su%% |
26 |
%%echo -e 'DocumentRoot "srv/www/htdocs/ |
|
26 | %%echo -e 'DocumentRoot "srv/www/htdocs/myproject"\nServerName "myproject"' > /etc/apache2/conf.d/vhost.conf %% | |
27 | 27 | |
28 | 28 | Did it work? |
29 | 29 | %% cat /etc/apache2/conf.d/vhost.conf%% |