apache解析兩個域名訪問同一個專案的不同頁面
在你安裝後的Apache目錄下,有一個conf目錄,在這個目錄裡,有一個"httpd.conf"檔案.我們要做的,就是修改這個檔案.
在這個檔案裡,凡是以"#"開頭的每一行,都是無效的,如果你想讓你的設定起作用,就要把行首的"#"去掉.
找到
DirectoryIndex 這段.把它改成DirectoryIndex index.php index.Html index.html
這樣,你的網站目錄的預設首頁是 index.php, 如果沒有index.php系統會自動尋找index.html、html做為預設首頁了。
注意事項:index.php index.Html之間要有一個空格
另外你還可以操作一下其它的:
找到
ServerRoot 這段.將它設成你的Apache安裝目錄,我的是 ServerRoot "D:/Apache Group/Apache2"
找到 DocumentRoot 這段.把他設成你網站的根目錄,我的是 DocumentRoot "D:/Apache Group/web
相關推薦
apache解析兩個域名訪問同一個專案的不同頁面
在你安裝後的Apache目錄下,有一個conf目錄,在這個目錄裡,有一個"httpd.conf"檔案.我們要做的,就是修改這個檔案. 在這個檔案裡,凡是以"#"開頭的每一行,都是無效的,如果你想讓你的設定起作用,就要把行首的"#"去掉. 找到 DirectoryIndex 這段.把它改成D
nginx兩個域名指向一個專案的解決辦法
域名伺服器跳轉 server { listen 80; server_name www.xxx.com; index index.html index.htm index.php; root /data/ww
Apache配置多站點域名訪問,並反向代理到Tomcat專案
問題描述:伺服器上裝配了Apache服務和Tomcat服務,Apache服務按照慣例分配80埠,Tomcat服務按照慣例佔用8080埠,但是本人因為專案需要,開發了幾個PHP的專案,需要Apache服務進行支援,而且需要不同的域名訪問對應的專案。另外,主機上還存在JavaEE
nginx代理雙域名,同一個IP地址的伺服器實現兩個域名配置
作業系統環境:win2003Server 安裝軟體:Nginx 環境:安裝兩個tomcat服務,一個為9001埠、一個為9002埠,nginx預設為80埠 #目的:實現一個80埠,兩個域名同時可以訪問,nginx作為代理接收80埠的資料,轉發到後端的tomcat服務處理 1
linux系統一個tomcat配置兩個域名,每個域名對應一個專案
由於專案的需要,我們公司有兩個域名,每個域名對應一個專案,這樣我們就可以使用不同的域名訪問不同的專案了, 我們的網站使用的是web伺服器Tomcat,框架是自己封裝的簡易版jsp-servlet,域名
【097】Nginx實現一臺伺服器,兩個域名釋出不同的前端專案,並且兩個域名都用80埠。
有時候你可能需要在一個伺服器上,用 nginx 釋出兩個前端專案。並且這兩個前端專案使用不同的域名,域名都繫結80埠。本文說明此場景下的操作過程。Nginx使用的是 Docker 官方映象。本文依據的作業系統是 Linux Centos7.3 。 假設 you
關於用兩個網址訪問一個服務器上不同站點
com dex 監聽 listen 解決方法 rtu one 不同 mage 要求就是通過http://www.xiaolu.com訪問在位置f:myblog下的文件index.html;通過http://www.xiaolu1.com訪問在位置f:myblog1下的in
直通通過域名訪問web專案 --以springboot為例
上文介紹了將域名和IP的繫結,下面我們來配置下直接通過域名訪問服務。 概述:我用的是springboot專案做的web端,其他服務也是大同小異,原理相同。 1、先看我的一個後臺介面 直接返回JSON資料 {"12":123,"password":"3234234","nam
推薦兩個不錯的flink專案
最近flink真是風生水起,但是浪院長看來這不過是阿里錯過了創造spark影響力之後,想要在flink領域建立絕對的影響力。但是,不可否認flink在實時領域確實目前來看獨樹一幟,當然也有它不適合的地方,比如今天要推薦的第一個基於flink開發的專案,流表和維表的join,還有很多地方還是用spark str
Nginx反向代理實現多個域名指向同一個ip的不同網站解決方法
一個伺服器需要掛載多個專案【重點是都能通過域名訪問】 實現原理: 1.當前市面上看到的一些伺服器,開放的埠一般都要求為 '80' 埠 所以80埠成了商用埠 2.域名的繫結是繫結一個一般是繫結你的伺服器ip地址 3.使用伺服器的80埠攔截訪問的域名是什麼跳轉至伺服器的其他 舉例 只有一臺伺服器
通過域名訪問web專案
上一章講了如何部署web專案到雲伺服器點選開啟連結,現在來說一下如何用過域名來訪問你的web專案 一、首先你需要解析你的域名,這一步在你的域名管理裡有 二、修改Tomcat配置 1、修改埠 tomcat預設監聽埠是8080,我們如果想不帶埠的直接訪問專案,就必須監聽
2018值得關注的兩個黑馬區塊鏈專案:烏鴉幣rvn,威圖 Wetube Network
一個優秀的投資者,在進行每一次操作之前,也應該像獵豹尋找獵物一樣,仔細分析每個幣的投資價值,並且,耐心等待進場點的出現,等待出場點的到來,等待利潤的增加。那麼可以讓我們看看2018年值得關注的2個黑馬區塊鏈專案。 烏鴉幣(rvn) 小編綜合了部分網路資訊,簡單給
使用域名訪問本地專案and nginx解決埠問題
使用域名訪問本地專案 域名解析 一個域名一定會被解析為一個或多個ip。這一般會包含兩步: 本地域名解析 瀏覽器會首先在本機的hosts檔案中查詢域名對映的IP地址,如果查詢到就返回IP ,沒找到則進行域名伺服器解析,一般本地解析都會失敗,因為預設這個檔案是空
nginx兩個域名繫結同一臺伺服器
手頭有一域名 testA.cn 現在我要將 www.test.cn 和 tom.test.cn 對應到我的ip為 (9.12.4.41)的雲伺服器上。現操作步驟如下 在雲伺服器廠商管理臺處 設定域名的解析,將兩個域名的解析地址都設定為 9.12.4.41 這個ip地址
通過Nginx反向代理,在一臺伺服器上配置兩個域名
如果想在一臺伺服器上配置兩個域名,可以採用部署兩個Tomcat,分別繫結不同的埠,然後通過Nginx做反向代理,將兩個域名分別指向兩個Tomcat上。從而實現在一臺伺服器上配置兩個域名,或者多個域名的功能。配置方法如下:首先,通過配置Tomcat的server.xml,讓to
用Apache配置多個域名的方法(絕對成功!)
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "D:/wamp/www/" ServerName localhost ServerAlias localhost Erro
兩個linux共享同一個/home分割槽(轉載)
轉載自:http://linux.itwaka.com/administer/36278.html 經過我的三個小時的緊張而又忙碌的工作,終於讓我的兩個linux共用了同一個/home分割槽,在這裡寫一下這個過程。 以前對linux的只是瞭解不多,在安裝的時候沒有
織夢兩個後臺使用同一個資料庫問題
一、修改data資料夾下的資料庫配置檔案,兩個後臺呼叫同一個資料庫 二、複製一份後臺配置檔案 1.在資料庫找到表dede_sysconfig(如果改了字首自己換啊),把這張表複製一份並且重新命名為dede_sysconfigm(名字隨便起,同樣注意字首) 2.把網站檔案全部
一個Tomcat部署兩個或以上的專案
廢話不說,我們直奔主題 1.Tomcat的解壓檔案目錄下的conf資料夾中找到server.xml檔案; 2.找到server.xml檔案的最底部的</Service>和</Server>標籤;如下圖: </Service> &l
tomcat設定一級域名、二級域名訪問指定專案
如何單IP的多個域名訪問不同專案 二級域名的獲取 首先域名的獲取有多種辦法,需要申請,在萬網和阿里雲官網都可以獲取。本文考慮你已經擁有了自己的域名,接下來可以在萬網或者阿里雲官網(現在並在了一起)設定自己的二級域名,比如域名為test.com,可以去萬網