好的,出于开发目的,我们有一个专用的web服务器.它目前没有直接连接到互联网,所以我在另一台服务器上安装了一个apache反向代理,它会转发到开发服务器.
This way, I can get web access to the server.
问题是,Laravel中的路由现在以内部服务器IP地址或服务器计算机名作为前缀.
例如,我转到http://subdomain.test.com,但使用route()
助手生成的所有路由都显示以下url:http://10.47.32.22
而不是http://subdomain.test.com
.
The reverse proxy is setup as such:
<VirtualHost *:80>
ServerName igateway.somedomain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://10.47.32.22:80/
ProxyPassReverse / http://10.47.32.22:80/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
我已将实际域名设置为config\app.php
.
Question
如何设置路由中使用的默认URL?我不希望它使用内部地址,因为这违背了反向代理的意义.
我试着把我所有的路由围成一个Route::group(['domain' ...
人的小组,这也不管用.