apache同一連接埠下的多網站配置

來源:互聯網
上載者:User

標籤:apach   erro   ted   vhost   mod   virtual   修改   bsp   .com   

之前寫過一篇多連接埠的配置,這個是在同一連接埠下配置多個網站,並且為每個項目命名相應的網站名稱,不用那麼麻煩去為每一個項目配置一個連接埠。該配置需要修改以下檔案: 1、httpd.conf

首先開啟rewrite.so擴充、mod_vhost_alias.so擴充,開啟Include conf/extra/httpd-vhosts.conf

把Directory修改如下:<Directory />    AllowOverride all    Require all granted</Directory> 2、httpd-vhosts添加<VirtualHost *:80>    ServerAdmin [email protected]    DocumentRoot "E:/wamp/www/learnlaravel5/public/"      #必須在www下    ServerName  laravel.cm                                   #網站名稱    ErrorLog "logs/dummy-host.example.com-error.log"    CustomLog "logs/dummy-host.example.com-access.log" common</VirtualHost> 3、windows系統的host檔案                C:\Windows\System32\drivers\etc 添加   127.0.0.1     laravel.cm 完畢。 然後就可以在瀏覽器裡訪問 laravel.cm  就是laravel的入口檔案。

apache同一連接埠下的多網站配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.