環境
Windows10
Apache 2.4.37 (Win32)
PHP 7.3.1
C:\xampp\apache\conf\extra\httpd-vhosts.conf
conf
1<VirtualHost *:80> 2 DocumentRoot "C:\xampp\htdocs\php\MyApp\laravel5.8\public" 3 ServerName mylaravel58.com 4 <Directory "C:\xampp\htdocs\php\MyApp\laravel5.8\public"> 5 AllowOverride All 6 Options All 7 Require all granted 8 </Directory> 9</VirtualHost>
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 localhost 127.0.0.1 mylaravel58.com
C:\xampp\apache\conf\httpd.confのドキュメントルートの記述
conf
1DocumentRoot "C:/xampp/htdocs" 2<Directory "C:/xampp/htdocs"> 3 # 4 # Possible values for the Options directive are "None", "All", 5 # or any combination of: 6 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 7 # 8 # Note that "MultiViews" must be named *explicitly* --- "Options All" 9 # doesn't give it to you. 10 # 11 # The Options directive is both complicated and important. Please see 12 # http://httpd.apache.org/docs/2.4/mod/core.html#options 13 # for more information. 14 # 15 Options Indexes FollowSymLinks Includes ExecCGI 16 17 # 18 # AllowOverride controls what directives may be placed in .htaccess files. 19 # It can be "All", "None", or any combination of the keywords: 20 # AllowOverride FileInfo AuthConfig Limit 21 # 22 AllowOverride All 23 24 # 25 # Controls who can get stuff from this server. 26 # 27 Require all granted 28</Directory>
ブラウザでlocalhostにアクセスするとC:/xampp/htdocsではなくmylaravel58.comと同じLaravel5.8のトップページに接続されます。
C:/xampp/htdocsに接続されるようにするにはどうすればいいですか?

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/16 01:56
2019/07/16 02:00
2019/07/16 02:12
2019/07/16 02:21
2019/07/16 02:26 編集