Tau*_*sif 2 linux apache macos virtualhost laravel
我使用的是 MAC 操作系统和 apache 2.4。我为我的本地开发创建了一个虚拟主机。该虚拟主机正在重定向到 https 而不是简单的 http(我需要它在 http 中工作)。我已经在 chrome 和 safari 上试过了。这是一个 Laravel 项目。
这是httpd-vhosts.conf的内容
# ServerAlias www.dummy-host.example.com
# ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
# CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
#</VirtualHost>
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host2.example.com
# DocumentRoot "/usr/docs/dummy-host2.example.com"
# ServerName dummy-host2.example.com
# ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
# CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
#</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/onboardera/public"
ServerName onboardera.dev
ServerAlias onboardera.dev
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents/multi-site/public"
ServerName multi-site.dev
ServerAlias multi-site.dev
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
以下是主机文件的内容。
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 multi-site.dev
127.0.0.1 khan.multi-site.dev
127.0.0.1 onboardera.dev
255.255.255.255 broadcasthost
::1 localhost
Run Code Online (Sandbox Code Playgroud)
.dev域名属于 google,Google Chrome 推出了 v63,现在强制所有.dev域名使用 HTTPS。
所以您可以尝试其他浏览器或使用.local或.test
可行的选择是切换到 Firefox 作为您的开发浏览器。它\xe2\x80\x99 速度很快,拥有舒适的开发工具,并且在过去几年中确实做出了大量改进。
\n| 归档时间: |
|
| 查看次数: |
546 次 |
| 最近记录: |