Versionsunterschiede von Test Server / Setting Up Virtual Hosts
| 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. | 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/ %% | 13 | %% cd /srv/www/htdocs/ %% |
| 14 | 14 | ||
| 15 |
%% sudo mkdir |
15 | %% sudo mkdir myproject%% |
| 16 | 16 | ||
| 17 | Create a new file in the above mentioned directory by using the following command. | 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>MyWiki Works!</h1>\n\t</body>\n</html>' > /srv/www/htdocs/ |
19 | %% echo -e '<html>\n<html>\n\t<body>\n\t\t<h1>MyWiki Works!</h1>\n\t</body>\n</html>' > /srv/www/htdocs/myproject/index.html %% |
| 20 | 20 | ||
| 21 | Create a new virtualhost configuration file in the below mentioned directory and configure it as follows. | 21 | Create a new virtualhost configuration file in the below mentioned directory and configure it as follows. |
| 22 | 22 | ||
| 23 | /etc/apache2/conf.d/vhost.conf | 23 | /etc/apache2/conf.d/vhost.conf |
| 24 | 24 | ||
| 25 |
%% echo -e 'DocumentRoot |
25 | %% echo -e 'DocumentRoot "\srv/www/htdocs/site1"\ \nServerName www.linuxhelp1.com"\' > /etc/apache2/conf.d/vhost.conf %% |
| 26 | 26 | ||
| 27 | ---- | 27 | ---- |
| 28 | 28 |