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

有帮助吗?

解决方案

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

其他提示

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top