sudo su -
vi /etc/apache2/httpd.conf
#Include /private/etc/apache2/extra/httpd-vhosts.conf
Include /private/etc/apache2/vhosts/*.conf
mkdir /etc/apache2/vhosts
cd /etc/apache2/vhosts
vi _default.conf
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
stinnet wrote:Could you tell where you have stuck?
Here's a short for a cleaner process:
1. Switch to root user in the Terminal not to have problems with permission
- Code: Select all
sudo su -
2. Then edit the config file
- Code: Select all
vi /etc/apache2/httpd.conf
3. Then find this line
- Code: Select all
#Include /private/etc/apache2/extra/httpd-vhosts.conf
4. Add the following line below
- Code: Select all
Include /private/etc/apache2/vhosts/*.conf
5. Then create this directory
- Code: Select all
mkdir /etc/apache2/vhosts
cd /etc/apache2/vhosts
6. And create the default virtual host config file
- Code: Select all
vi _default.conf
7. Add this config
- Code: Select all
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
After this stage you will have a smoother install.
Users browsing this forum: No registered users and 43 guests