當前位置:首頁 » 操作系統 » linux配置apache2

linux配置apache2

發布時間: 2024-11-30 07:00:30

① 用linux命令重啟apache2伺服器失敗是怎麼回事

linux重啟apache無反應的解決方法:
service httpd start ,輸入ps -ef |grep httpd, 看apache進程是否在運行;
在別的機器上用IP訪問下這台WEB伺服器,看能否打開apache測試頁
service httpd stop,再輸入ps -ef |grep httpd 看apache進程是否在運行。
徹底刪除APACHE,重新下載一個。
Linux是一套免費使用和自由傳播的類Unix操作系統,是一個基於POSIX和UNIX的多用戶、多任務、支持多線程和多CPU的操作系統。它能運行主要的UNIX工具軟體、應用程序和網路協議。它支持32位和64位硬體。Linux繼承了Unix以網路為核心的設計思想,是一個性能穩定的多用戶網路操作系統。

② ubuntu linux + apache2+ svn 怎麼實現外網訪問IP地址限制

方法如下:

1) 在httpd.conf文件中添加下面語句,表示使用這個模塊的功能

LoadMole authz_host_mole bin/mod_authz_host.so

2)然後是:

Options FollowSymLinks

AllowOverride None

Order deny,allow

allow from 10.10 192.168.1 #允許兩個網段可以訪問

denyfrom all

3)完整代碼為:

<Location/svn>
DAVsvn
SVNPath/home/svn
AuthTypeBasic
AuthName"myprojectsubversionrepository"
AuthUserFile/etc/subversion/passwd
Requirevalid-user
OrderDeny,Allow
DenyfromAll
Allowfrom192.168.1-------------------------只有這個段的ip能訪問。
</Location>

③ linux下Apache2的安裝和配置

在Ubuntu中安裝apache

安裝指令:sudo apt-get install apache2

安裝結束後:

產生的啟動和停止文件是:/etc/init。d/apache2

啟動:sudo apache2ctl -k start

停止:sudo apache2ctl -k stop

重新啟動:sudo apache2ctl -k restart

配置文件保存在:/etc/apache2

需要說明的是,普通的apache發行版本配置文件是:

httpd。conf

Ubuntu發行版本的主配置文件是:

apache2。conf

在apache2。conf引用到了以下文件:

# 包含動態模塊的配置:

Include /etc/apache2/mods-enabled/*。load

Include /etc/apache2/mods-enabled/*。conf

# 包含用戶自己的配置:

Include /etc/apache2/httpd。conf

# 包含埠監聽的配置:

Include /etc/apache2/ports。conf

# 包含一般性的配置語句片斷:

Include /etc/apache2/conf。d/

# 包含虛擬主機的配置指令:

Include /etc/apache2/sites-enabled/

修改httpd。conf

增加以下內容:

ServerName 127。0。0。1:80

④ linux 如何重啟apache

樓上的都可以,不過我個人用 httpd -k restart 關鍵是找到httpd這個文件。 [root@test bin]# httpd restart -bash: httpd: command not found 明顯是bash在path所指的目錄下找不到httpd,試試找到它,然後用絕對路徑。比如我們這里是 /home/service/apache/bin/httpd -k restart

⑤ Linux下apache啟動命令是什麼

基本的操作方法:
本文假設你的apahce安裝目錄為/usr/local/apache2,這些方法適合任何情況
apahce啟動命令:
推薦/usr/local/apache2/bin/apachectl start apaceh啟動
apache停止命令
/usr/local/apache2/bin/apachectl stop 停止
apache重新啟動命令:
/usr/local/apache2/bin/apachectl restart 重啟
要在重啟 Apache 伺服器時不中斷當前的連接,則應運行:
/usr/local/sbin/apachectl graceful
如果apache安裝成為linux的服務的話,可以用以下命令操作:
service httpd start 啟動
service httpd restart 重新啟動
service httpd stop 停止服務

Linux系統為Ubuntu
一、Start Apache 2 Server /啟動apache服務
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
二、 Restart Apache 2 Server /重啟apache服務
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
三、Stop Apache 2 Server /停止apache服務
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop

熱點內容
如何提取腳本按鍵 發布:2025-03-10 21:29:04 瀏覽:218
遼寧省dns伺服器怎麼填物理機 發布:2025-03-10 21:25:05 瀏覽:787
雲計算機伺服器區別 發布:2025-03-10 21:10:21 瀏覽:235
古代錦衣衛需要哪些配置 發布:2025-03-10 21:06:17 瀏覽:617
ps樣式在的文件夾 發布:2025-03-10 20:50:07 瀏覽:613
圖像壓縮編碼演算法 發布:2025-03-10 20:48:23 瀏覽:385
墮落解壓縮碼 發布:2025-03-10 20:46:55 瀏覽:625
做影視網站用什麼伺服器 發布:2025-03-10 20:44:51 瀏覽:261
oracle調用存儲過程語法 發布:2025-03-10 20:39:56 瀏覽:983
ps圖層樣式文件夾 發布:2025-03-10 20:38:05 瀏覽:411