自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Ubuntu LAMP 如何配置Apache

系統(tǒng) Linux
用過LAMP的人們都知道,LAMP是由 Linux+Apache+Mysql+Perl/PHP/Python 一起組成的,每個部分都扮演著重要的角色,像Apache是世界使用排名第一的Web服務器軟件。本文為大家介紹的是他的配置情況!

 

Apache 

圖-Apache

  Ubuntu LAMP 如何配置Apache

  1. 啟用 mod_rewrite 模塊

  終端命令:sudo a2enmod rewrite

  重啟Apache服務器:sudo /etc/init.d/apache2 restart

  Apache重啟后我們可以測試一下,在/var/www目錄下新建文件test.php,寫入代碼: 保存,在地址欄輸入http://127.0.0.1/test.php 或 http://localhost/test.php ,如果正確出現(xiàn)了php 配置信息則表明LAMP Apache已經(jīng)正常工作了(記得重啟Apache服務器后再測試)。

  2.設置Apache支持.htm .html .php

  sudo gedit /etc/apache2/apache2.conf

  或sudo gedit /etc/apache2/mods-enabled/php5.conf

  在打開的文件中加上

  AddType application/x-httpd-php .php .htm .html 即可。

通過文章的簡單描述,我們清楚的知道了Apache的配置情況,希望大家能掌握它!

【編輯推薦】

  1. 如何LAMP下安裝phpmyadmin-Mysql數(shù)據(jù)庫管理
  2. 設置Ubuntu lamp文件執(zhí)行讀寫權限
  3. Ubuntu環(huán)境下如何安裝LAMP組件
  4. LAMP平臺環(huán)境的構建手冊
  5. 幫你搭建自己lamp平臺
  6. lamp平臺搭建的總結

 

責任編輯:趙鵬 來源: 網(wǎng)絡轉載
相關推薦

2011-03-10 10:09:13

Ubuntu搭建LAMP

2011-03-14 11:29:43

2011-03-09 15:13:00

UbuntuLAMP配置

2011-03-11 10:27:45

UbuntuLAMP配置

2011-03-11 16:42:38

Ubuntu安裝LAMP

2011-03-21 11:33:09

LAMPApache

2011-03-11 14:02:53

Apache配置

2011-03-10 08:59:04

Ubuntu安裝LAMP

2021-01-22 15:18:21

UbuntuLinuxApache

2011-03-10 10:51:45

Ubuntu搭建LAMP

2011-08-16 15:16:26

UbuntuApache虛擬主機

2011-03-09 15:25:36

UbuntuLAMPPHPadmin

2011-03-11 10:09:59

UbuntuLAMP路徑

2011-03-08 10:35:23

2016-01-06 14:00:20

Ubuntu 14Ubuntu 15Apache Solr

2010-01-07 16:34:08

Ubuntu apac

2011-03-21 13:04:38

LAMPApache

2011-03-22 10:25:54

UbuntuLAMP

2011-03-11 12:57:36

UBUNTU10.10安裝LAMP

2011-03-21 10:49:33

LAMPApache
點贊
收藏

51CTO技術棧公眾號