當前位置:首頁 » 操作系統 » linuxapache域名配置

linuxapache域名配置

發布時間: 2022-08-30 03:21:26

linux下如何配置apache伺服器域名

主配置文件httpd.conf中配置,建議用虛擬目錄

⑵ linux下apache配置多域名只有一個域名可以子目錄訪問 增加的域名不能實現子目錄訪問是什麼問題

跟據你所描述的情況看,應該是你的配置文件有些問題,
正常來說都是可訪問的,建議你把配置文件test.b.com的那一部分展示一下。

⑶ LINUX CENTOS7 關於DNS,DHCP,Apache的配置

這問題,也是夠了。要實驗報告,估計沒有人幫的了你,好多人都討厭伸手黨,技術控們喜歡的是技術交流。所以linux要好好學習,腳踏實地。linux的apache的建議參考《linux就該這樣學》這本書,這個是7版本的。有什麼問題也可以去哪個群里問問還是那句話,大家需要的技術交流,學習linux要自己動手,腳踏實地,希望能夠幫助到你

⑷ 伺服器上的linux系統 apache怎麼配置多個域名解析

首先,配置dns,對兩個域名進行解析。其次,配置apache的虛擬主機,做基於域名的虛擬主機。

⑸ 在linux中搭建基於域名的虛擬主機,配置完成後,重啟apache服務不成功。

line 1 of /usr/local/apache/conf/extra/httpd-virtual.conf 告訴你:
httpd-virtual.conf第一行有錯誤
NameVirtualHost not allowed here 告訴你:
虛擬主機名不能在這里定義

給你一個例子:
<VirtualHost http_ip:80>
ServerAdmin admin@localhost
DocumentRoot "/var/www/cacti"
ServerName www.mycacti.com //最好與主機名相同
ErrorLog "logs/cacti-error_log"
CustomLog "logs/cacti-access_log" common
<Directory "/var/www/cacti">
Options None
DirectoryIndex index.php
AllowOverride Options FileInfo
Require all granted
</Directory>
</VirtualHost>

⑹ linux伺服器如何綁定域名

使用一鍵安裝包配置的apache環境,添加網站配置方法如下:
1.命令:cd /alidata/server/httpd/conf/vhosts/
進入網站的配置文件目錄
2.命令:vi aa.conf
創建一個新的配置文件
3.按鍵盤上的字母 「i」 ,開始編輯文件,將下面的內容復制過去。

Order allow,deny
Deny from all

DocumentRoot /alidata/www/test
ServerName www.test.com
ServerAlias test.com

Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all

RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2

ErrorLog "/alidata/log/httpd/test-error.log"
CustomLog "/alidata/log/httpd/test.log" common

對應自己的
ServerName www.test.com 綁定的網站域名
ServerAlias test.com 綁定的網站別名(您如果有多個域名添加在這里)沒有的話,這個可以刪除。
DirectoryIndex index.html index.php index.htm 設置默認首頁
DocumentRoot /alidata/www/test 和 Directory "/alidata/www/test" 和 DirectoryMatch "/alidata/www/test/都是指定網站的目錄,需要一致。
ErrorLog "/alidata/log/httpd/test-error.log" 和 CustomLog "/alidata/log/httpd/test.log" 對應的日誌名字也需要自己修改一下,可以區分網站的日誌信息。
4.輸入命令:/alidata/server/httpd/bin/apachectl restart 重啟apache測試。

⑺ linux+apache 如何配置二級域名

我這有個全自動安裝的,
1.Apache更新到2.2.4
2.PHP更新到5.2.4
3.Zend更新到3.3.0
4.精簡了安裝程序的體積
mysql+
phpmysqladmin+MySqlManager+...
都全了,一安裝,全能用了,
速度,和安全性都優化好了,可直接架伺服器用..

⑻ linux apache配置二級域名怎麼做才正確

二級域名被當做獨立的網站,你在配置中沒有配置二級域名,所以會跳轉到默認域名(也就是配置中的第一個)

⑼ linux伺服器 Apache伺服器如何設置二級域名綁定子目錄

首先,解析二級域名,綁定到同一個IP。 假如二級域名是erji.test.com
進入伺服器,打開http.conf
一般情況下文檔最下面是有一段
#<VirtualHost *:80>

#ServerAdmin .....................
#DocumentRoot /www/docs/..............
#ServerName mmy-host.example.com
#.........
#...........
#</VirtualHost>
把上面一段前面的#號去掉,然後修改DocumentRoot的路徑到二級文檔的目錄,serverName也改一下,然後在中間加一行 ServerAlias erji.test.com

保存 重啟httpd

熱點內容
jquery獲取上傳文件 發布:2025-05-14 20:27:57 瀏覽:43
雲web伺服器搭建 發布:2025-05-14 20:25:36 瀏覽:525
汽修汽配源碼 發布:2025-05-14 20:08:53 瀏覽:742
蜜蜂編程官網 發布:2025-05-14 19:59:28 瀏覽:57
優酷怎麼給視頻加密 發布:2025-05-14 19:31:34 瀏覽:635
夢三國2副本腳本 發布:2025-05-14 19:29:58 瀏覽:860
phpxmlhttp 發布:2025-05-14 19:29:58 瀏覽:434
Pua腳本 發布:2025-05-14 19:24:56 瀏覽:449
蘋果像素低為什麼比安卓好 發布:2025-05-14 19:13:23 瀏覽:461
安卓機微信怎麼設置紅包提醒 發布:2025-05-14 19:00:15 瀏覽:272