Question

I have a Mac server with Apache.

I would like reach 127.0.0.1/mywebsite by an alias in local, for example : myweb.

How could i do for it ? Use httpd.conf ?

I'm waiting for your anwser

Was it helpful?

Solution

You can try creating a virtual host like explained here.

You have to edit

/etc/apache2/httpd.conf

and

/etc/apache2/extra/httpd-vhosts.conf

OTHER TIPS

You could edit your /etc/hosts file and add an alias, but you'd still have to add the path if there's no root index.

I tried this in my hosts file and it worked perfectly.

127.0.0.1      myweb

You'll also need to flush your DNS cache with a

sudo killall mDNSResponder
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top