如何在laravel 4.2中将http:// localhost:8000 /更改为其他域名

时间:2016-04-29 11:33:01

标签: php ubuntu laravel-4

我最近开始使用Laravel 4.2(使用Ubuntu OS)。 有人可以帮助我如何用dev.laravel.com之类的东西替换/别名http://localhost:8000/。提前谢谢!

/ etc / hosts

127.0.0.1	localhost
127.0.0.1	dev.training.com
127.0.0.1	dev.lessons.com
127.0.0.1	dev.pingpong.com
127.0.0.1	dev.wireframe.com
127.0.0.1	dev.laravel.com
127.0.0.1	dev.newapp.com
127.0.1.1	srturaka-pc

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

虚拟主机设置

<VirtualHost dev.laravel.com:8000>
  ServerName dev.laravel.com
  ServerAlias www.dev.laravel.com
  DocumentRoot /var/www/html/dev.laravel.com
</VirtualHost>

0 个答案:

没有答案