문제

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