UbuntuHelp:ApacheMySQLPHP(转)

来源:互联网 发布:exchange 更改域名 编辑:程序博客网 时间:2024/05/17 21:38

UbuntuHelp:ApacheMySQLPHP/zh

出自Ubuntu中文

 

 

 

 

目錄

[隱藏]
  • 1 簡介
  • 2 檢查需要
  • 3 在Ubuntu 6.06 LTS (Dapper Drake) 里安裝 默認LAMP集群
  • 4 在 Ubuntu 7.04 (Feisty Fawn) 里安裝 默認LAMP集。
  • 5 啟用完后,怎麼刪除LAMP集群
  • 6 安裝 Apache2
    • 6.1 故障檢修
    • 6.2 虛擬主機
  • 7 安裝 PHP5
    • 7.1 故障檢修
    • 7.2
  • 8 安裝PHP4
    • 8.1 故障檢測
  • 9 Installing MYSQL with PHP 5
  • 10 Installing MYSQL with PHP 4
  • 11 安裝PHP后
  • 12 安裝MySQL后
    • 12.1 Set mysql root password
    • 12.2 創建一個mysql資料庫
    • 12.3 創建一個mysql用戶:
    • 12.4 備份設置
    • 12.5 可選
  • 13 Phpmyadmin and mysql-admin
    • 13.1 故障檢測
    • 13.2 可選:源碼安裝phpMyAdmin
    • 13.3 Mysql-admin
    • 13.4 mysql-admin
    • 13.5 更多信息
  • 14 編輯apache配置
  • 15 編輯PHP配置以便與mysql共同工作(Ubuntu Dapper)
    • 15.1 第一個解決方法
    • 15.2 第二個解決方法
  • 16 運行,停止,測試和重啟 Apache
  • 17 使用 Apache
  • 18 狀態
  • 19 加固Apache
  • 20 密碼保護一個目錄(Password-Protect a Directory)
    • 20.1 (用 .htaccess 密碼保護一個目錄)Password-Protect a Directory With .htaccess
  • 21 略圖(thumbnails)
  • 22 已知問題
    • 22.1 與Skype不兼容
  • 23 其他Apache選項
  • 24 更多信息

[編輯] 簡介

Parent page: Programming Applications This is to help people setup and install a LAMP (Linux-Apache-MySQL-PHP) server in Ubuntu, including Apache 2, PHP 4 or 5, and MySQL 4.1 or 5.0. When installing from the Ubuntu 6.06 (Dapper Drake) "Server cd", you have the option of choosing to install a LAMP setup at the inital Ubuntu installation screen. That will install apache2, php5 and mysql 5.0.

這是幫助大家在Ubuntu里安裝並設置一個LAMP(Linux-Apache-MySQL-PHP)服務。其中包括Apache 2, PHP 4/5 和 MySQL 4.1/ 5.0。當你從Ubuntu 6.06 (Dapper Drake)「Server CD」里安裝系統, 在Ubuntu安裝程序的開始時有一個讓你選擇安裝LAMP的選項。選擇后將安裝apache2, php5 and mysql 5.0.

[編輯] 檢查需要

Some applications require php4 while others will work with php5. Be sure to install the version of php and the corresponding apache2 module for it. You cannot have both php4 and php5 modules running on the same instance of apache2 at the same time. Installing one may remove the other. If you have both php4 and php5 installed, be aware of which version of the apache2 php module you have. If libapache2-mod-php5 is already installed, the php4 package will install libapache-mod-php4 and not libapache2-mod-php4 package. If libapache2-mod-php5 is not installed, installing php4 will install the apache2 php module (libapache2-mod-php4). See this example. Most web applications will use Apache2, php5 and mysql5.0. If no specific versions are mentioned in your web application's documentation, use those.

 

有些應用程序用PHP5工作,有些則需要PHP4。確定應用程序安裝的PHP版本和對應的apache2模塊。你不能把PHP4和php5同時安裝在同一個apache2實例中。安裝了其中的一個會刪除另一個。如果你都安了php4和php5,了解哪個版本適的apache2 php模塊是你要用的。如果libapache2-mod-php5已經安裝了,php4的軟體包應該安裝libapache-mod-php4而不是libapache2-mod-php4。如果libapache2-mod-php5 軟體包沒有被安裝,則php4就要安apache2 php模塊(libapache2-mod-php4)。看這個例子,大部分的web程序都用Apache2,php5和mysql5.0.如果你的web程序的文檔里沒有提到要特定的版本,就安裝它們。

[編輯] 在Ubuntu 6.06 LTS (Dapper Drake) 里安裝 默認LAMP集群

 

如果你沒有用伺服器版CD里的LAMP安裝程序安裝它,但又不想重裝系統來安裝同樣的軟體包的話。用任何方式(any method)來安裝下列軟體包

apache2 php5-mysql libapache2-mod-php5 mysql-server

(比如 sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server)
這些包全都可以Ubuntu 6.06 LTS (Dapper Drake)的 main軟體庫里找到。一旦LAMP安裝完畢後,你需要為mysql設置一個root密碼,然後根據你的web程序創建一個資料庫,用戶和密碼。就這些!

[編輯] 在 Ubuntu 7.04 (Feisty Fawn) 里安裝 默認LAMP集。

在Feisty里,ubuntu基本系統包含了 Tasksel。你可以用tasksel或者像上面描述的那樣來安裝LAMP。

sudo tasksel install lamp-server

See Tasksel

[編輯] 啟用完后,怎麼刪除LAMP集群

To also remove the debconf data, use the purge option when removing. To get rid of any configurations you may have made to apache, manually remove the /etc/apache2 directory once the packages have been removed.

 

刪除以下軟體包來刪除LAMP集:

apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

可以用 purge參數來同時刪除配置日誌。當你要完全刪除apache的配置,在你刪除以上軟體包后,你要手動刪除
/etc/apache2 這個文件夾。

[編輯] 安裝 Apache2

用任何方式安裝Apache2網頁伺服器:

apache2(例如 sudo apt-get install apache2)

[編輯] 故障檢修

If you get this error: apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName then use a text editor such as "sudo nano" at the command line or "gksudo gedit" on the desktop to edit


如果你出現這個錯誤信息:apache2:不能找到完全有效的域名,現用127.0.0.1作為伺服器域名,然後在命令行用文本編輯器比如「sudo nano」或者在桌面用「gksudo gedit」來編輯。

/etc/apache2/httpd.conf

然後在文件尾行加入

ServerName localhost

 

[編輯] 虛擬主機

Apache2 has the concept of sites, which are separate configuration files that Apache2 will read. These are available in /etc/apache2/sites-available. By default, there is one site available called default this is what you will see when you browse to http://localhost or http://127.0.0.1. You can have many different site configurations available, and activate only those that you need. As an example, we want the default site to be /home/user/public_html/. To do this, we must create a new site and then enable it in Apache2. To create a new site:


  • * Change the DocumentRoot to point to the new location. For example, /home/user/public_html/
    * Change the Directory directive, replace <Directory /var/www/> to <Directory /home/user/public_html/
    * You can also set separate logs for each site. To do this, change the ErrorLog and CustomLog directives. This is optional, but handy if you have many sites
    * Save the file

Now, we must deactivate the old site, and activate our new one. Ubuntu provides two small utilities that take care of this: a2ensite (apache2enable site) and a2dissite (apache2disable site).

sudo a2dissite default && sudo a2ensite mysite

Finally, we restart Apache2:

sudo /etc/init.d/apache2 restart

If you have not created /home/user/public_html/, you will receive an warning message To test the new site, create a file in /home/user/public_html/:

echo '<b>Hello! It is working!</b>' > /home/user/public_html/index.html

Finally, browse to http://localhost/

 

apache2 有一站點的概念,這些站點分配配置文件供Apache2讀取。這些站點可以在 /etc/apache2/sites-available 找到。默認情況下,當你瀏覽[1] 或者 [2]時,只有一個命名為 『default』的有效站點可以顯示出來。你可以擁有許多不同的可用的站點配置,並且可以激活並啟用你需要的那個。舉個例子,我們想要把 /home/user/public_html/ 作為默認站點,我們就必須創建一個新的站點並且在apache2里開啟它。新建一個站點:

  • 複製默認網路站點作為起始頁:
  • sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
  • 用命令行里的文本編輯器「 sudo nano」或者「gksudo gedit」編輯一個新配置文件。例如:
  • gksudo gedit /etc/apache2/sites-available/mysite
  • 更改 ROOT文檔 來指向新的域。例如,/home/user/public_html/
  • 更改目錄指令,將 <Directory /var/www/> 更改為 <Directory /home/user/public_html/ >。這時可選的,但如果你有很多個站點,用它會很方便。
  • 保存文件

現在,我們要使舊的站點無效,並且激活新的站點。Ubuntu提供了兩個小工具:a2ensite (apache2enable site) and a2dissite (apache2disable site).

sudo a2dissite default && sudo a2ensite mysite

最後,重啟 Apache2:

sudo /etc/init.d/apache2 restart

如果你沒有創建 /home/user/public_html/,在測試新站點的時候你會收到一個錯誤信息。
在 /home/user/public_html/ 里創建一個文件:

echo '<b>Hello! It is working!</b>' > /home/user/public_html/index.html

最後瀏覽到 [3]

[編輯] 安裝 PHP5

用(任何方式)單獨安裝PHP5

php5(例如: sudo apt-get install php5)

如果你的系統里也安裝了PHP4,還需要安裝:

libapache2-mod-php5

[編輯] 故障檢修

[編輯]

Does your browser ask if you want to download the php file instead of displaying it? If Apache is not actually parsing the php after you restarted it, install libapache2-mod-php5. It is installed when you install the php5 package, but may have been removed inadvertently by packages which need to run a different version of php. You may also need to actually enable it, by doing sudo a2enmod php5 followed by sudo /etc/init.d/apache2 restart. Be sure to clear your browser's cache before testing your site again.

 

你的瀏覽器有沒有問你是否想要下載php而不運行它?如果Apache重啟后確實沒有解析php,安裝libapache2-mod-php5。這個包已經在你安裝PHP5的時候就安裝了的,但會在你安裝了其他版本的PHP后被無意中刪除了。在執行完
sudo /etc/init.d/apache2 restart后,你也許還要執行「sudo a2enmod php5」來激活它。
在你測試你的站點之前請確認已經清除掉瀏覽器的緩存。

 

[編輯] 安裝PHP4

用任何方式安裝PHP4:

php4

If PHP5 is present on your system, installing php4 will install the php module for apache (version 1.3) and not apache2. To use php4 with apache2, install

如果你的系統已經安裝了PHP5,在安裝php4時還要安裝apache(version1.3)的php模塊而不是apache2.若要在 apache2里使用php4,請安裝:

libapache2-mod-php4

[編輯] 故障檢測

 

你的瀏覽器有沒有問你是否想要下載php而不運行它?如果Apache重啟后確實沒有解析php,安裝libapache2-mod-php4。這個包已經在你安裝PHP5的時候就安裝了的,但會在你安裝了其他版本的PHP后被無意中刪除了。在執行完
sudo /etc/init.d/apache2 restart后,你也許還要執行「sudo a2enmod php4」來激活它。
在你測試你的站點之前請確認已經清除掉瀏覽器的緩存。

[編輯]
Installing MYSQL with PHP 5

使用任何方式安裝:

mysql-server libapache2-mod-auth-mysql php5-mysq

 

[編輯] Installing MYSQL with PHP 4

First enable the universe repository since the packages are not in main

因為軟體包不在main源里,所以先激活 universe 源
我正在使用Ubuntu伺服器版(命令行)
我正在用桌面版
使用任何方式安裝:

mysql-server libapache2-mod-auth-mysql php4-mysql

 

[編輯] 安裝PHP后

You may need to increase the memory limit that PHP imposes on a script. Edit the /etc/php5/apache2/php.ini file and increase the memory_limit value.

你也許需要提升存儲限制來讓PHP利用script(小程序)。編輯/etc/php5/apache2/php.ini文件並且提升存儲限制的值。

 

[編輯] 安裝MySQL后

Before you can access the database from other computers in your network, you have to change its bind address. Note that this can be a security problem, because your database can be accessed by others computers than your own. Skip this step if the applications which require mysql are running on the same machine. type:

設置mysql協議地址
在你可以從其他電腦通過網路訪問到資料庫之前,你必須更改它的協議地址。注意,這會是個安全問題,因為除了你之外的其他電腦也可以訪問到資料庫。如果需要用到的程序在同一個機器上運行,跳過這個步驟。輸入:

nano /etc/mysql/my.cnf

and change the line:

然後更改行

bind-address = localhost

to your own internal ip address e.g. 192.168.1.20

成你自己的內部 ip 地址 比如: 192.168.1.20

bind-address = 192.168.1.20

If your ip address is dynamic you can also comment out the bind-address line and it will default to your current ip. If you try to connect without changing the bind-address you will recieve a "Can not connect to mysql error 10061".

如果你的是動態IP地址,你也可以把 blind-adress 這一行給註釋掉。它會默認為你當前的IP。如果你沒有更改 bind-address的地址而嘗試鏈接,你會收到這樣一個錯誤信息:『Can not connect to mysql error 10061』。

[編輯]
Set mysql root password

在用控制台訪問資料庫之前,你需要輸入:

mysql -u root

在mysql控制台輸入:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

正確輸入mysql命令後會顯示:Query OK, 0 rows affected (0.00 sec) Mysql commands can span several lines

別忘了在你結束沒意思起來命令的時候在結尾加上分號。注意:如果你已經設置了root密碼,你將需要用到:

mysql -u root -p

(你忘記了 mysql-root 密碼嗎?查看 MysqlPasswordReset。)

[編輯]
創建一個mysql資料庫

mysql> CREATE DATABASE database1;

[編輯]
創建一個mysql用戶:

創建一個擁有所有許可權的新用戶(只用於檢測故障),在mysql prompt(字元控制台)里輸入:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;

創建一個擁有少許許可權的新用戶(用於在大部分web程序上工作),這個用戶只可以使用命名為「database1」的資料庫。在mysql prompt里輸入:

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON database1.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';

yourusername 和 yourpassword 可以是你喜歡的任何東西。database1 是用戶可以訪問的一個資料庫名稱。localhost是你訪問資料庫的域名,為了可以讓所有的域名鏈接(或者特定的域名)到你的資料庫,你可以把它改成「%」(或者改成主機名和ip地址)。注意,這會是一個安全問題而且只能用於測試目的!推出mysql prompt,輸入:

mysql> /q

因為你已經設置了root密碼,如果你要重新使用mysql(以mysql root身份),你需要使用:

mysql -u root -p

然後在prompt里輸入密碼。

[編輯] 備份設置

Please, let's say something in which directories MySql stores the database information and how to configure a backup

請讓我們來說一下那些目錄可以用來儲存 資料庫信息和如何備份

[編輯] 可選

有不止一種方式來設置mysql root密碼和創建資料庫。例如 mysqladmin可以這樣使用:

mysqladmin -u root -p password yourpassword

mysqladmin -u root -p create database1

mysqladmin 是LAMP默認安裝方式里提供的一個命令行工具。

[編輯] Phpmyadmin and mysql-admin

 

通過Phpmyadmin 和mysql-admin這兩個圖形界面工具可以完成 所有的mysql任務,包括設置root密碼和創建可用的資料庫。在安裝其中一個或者兩個都安裝之前,先激活 universe 源

我正在使用Ubuntu伺服器版(命令行)
我正在使用桌面版
用任何方式安裝:

phpmyadmin

[編輯] 故障檢測

'If you get blowfish_secret error: Choose and set a phrase for cryptography in the file /etc/phpmyadmin/blowfish_secret.inc.php and copy the line (not the php tags) into the file /etc/phpmyadmin/config.inc.php or you will receive an error.

如果你收到了簡訊密碼(或者密碼字,網上有兩個名字)錯誤信息
在/etc/phpmyadmin/blowfish_secret.inc.php里用密碼學選擇並設置一個短語 ,並且把該行(沒有PHP后綴)複製到文檔/etc/phpmyadmin/config.inc.php里,不然你就會收到錯誤信息。

 

[編輯] 可選:源碼安裝phpMyAdmin

查看phpMyAdmin說明頁面: 如何源碼安裝 phpmyadm

[編輯] Mysql-admin

在桌面版系統限制運行Mysql-admin。用any method 安裝

[編輯] mysql-admin

[編輯] 更多信息

你真的應該閱讀 2.9.3. Securing the Initial MySQL Accountsfrom the MySQL Reference Manual.

 

[編輯] 編輯apache配置

如果你想使當前用戶成為PHP頁面的管理員。你需要編輯apache的配置文檔:

$ gksudo "gedit /etc/apache2/apache2.conf"

Search both the strings starting by "User" and "Group", and change the names by the current username and groupname you are using. Then you'll need to restart Apache. (look at the next chapter concerning apache commands) Configuration options relating specifically to user websites (accessed through localhost/~username) are in /etc/apache2/mods-enabled/userdir.conf.

搜索所有以「User」和「Group」開頭的行,然後把名字更改成你當前的用戶名和你正在使用的組名。接著你需要重啟apache。(請看下一章,關於apache命令行)具體于用戶站點(通過 localhost/~username訪問)相關的配置選項在:/etc/apache2/mods-enabled/userdir.conf。

[編輯] 編輯PHP配置以便與mysql共同工作(Ubuntu Dapper)

In Dapper Drake, "extension=mysql.so" and "extension=mysqli.so" are enabled in the php.ini file out-of-the-box. However, sometimes php is not looking for those files in the right directory. You have then to move your files or modify the php.ini configuration.:

在Dapper Drake里,"extension=mysql.so" 和 "extension=mysqli.so"在php.ini文件里預設啟動的。但是,php有時候沒用通過正確目錄查查看這些文件。所以你必須移動你的文件或者修改php.ini配置:

[編輯] 第一個解決方法

locate the directory where the extension files are placed: locate mysql.so (change mysql.so in mysqli.so if you want to install the mysqli functions) -then modify the php.ini file to indicate the right place for the extension directory:

找出擴展文件放置的所在目錄:找出 mysql.so(如果你想安裝mysqli functions,把 mysql.so改成 mysqli.so),然後修改php.ini文件以指示出擴展目錄正確的放置位置:

$ gksudo "gedit /etc/php4/apache2/php.ini"

或者你用的是php5:

$ gksudo "gedit /etc/php5/apache2/php.ini"

查看 「extension_dir」的屬性,然後把它設置成mysql(i).so(你找到的)的所在目錄:

extension_dir= "/usr/lib/php5/20051025/"

重啟apache,接著測試你的mysql(i)functions是否工作。

[編輯]
第二個解決方法

locate the directory where the extension files are placed: locate mysql.so (change mysql.so in mysqli.so if you want to install the mysqli functions) Let's say that you found the file in '/usr/lib/php5/20051025/' -then check in the php.ini file for the extension directory

找出擴展文件放置的所在目錄:找出 mysql.so(如果你想安裝mysqli functions,把 mysql.so改成 mysqli.so),假設你找到的文件在 : '/usr/lib/php5/20051025/',作為擴展目錄把它登記到php.ini文件里。

$ gksudo "gedit /etc/php4/apache2/php.ini"

或者你用的是php5

$ gksudo "gedit /etc/php5/apache2/php.ini"

Look for the 'extension_dir' property. It should be by default '/usr/lib/php5/ext'. If it's not, change it for this value. -Now create the default directory for extensions:

查看(locate)'extension_dir'的屬性。它應該默認為 『/usr/lib/php5/ext』。如果不是,把它改成這個值。--現在為擴展文件創建一個默認的目錄:

$ sudo mkdir /usr/lib/php5/ext

Copy the extension file to the new directory:

--複製擴展文件到新建的目錄:

$ sudo cp /usr/lib/php5/20051025/mysql.so /usr/lib/php5/ext/mysql.so

Change the first path to the one you found with the locate function, and change mysql.so into mysqli.so if you want to use mysqli functions. -Restart apache (see below), and test if your mysql(i) functions are working.

把第一個路徑改成你用 locate功能 找到的那個,如果你想要使用 mysqli功能,把mysql.so 改成 mysqli.so。--重啟apache(看下面),然後測試看你的 mysql(i)功能 是否在工作。

[編輯] 運行,停止,測試和重啟 Apache

使用下列命令來運行 Apache:

$ sudo /usr/sbin/apache2ctl start

停止:

$ sudo /usr/sbin/apache2ctl stop

To test configuration changes, use :

測試配置的更改:

$ sudo /usr/sbin/apache2ctl configtest

最後,重啟使用:

$ sudo /usr/sbin/apache2ctl restart

[編輯]
使用 Apache

You can access apache by typing 127.0.0.1 or http://localhost (by default it will be listening on port 80) in your browser address bar. By default the directory for apache server pages is /var/www . It needs root access in order to put files in. A way to do it is just starting the file browser as root in a terminal:

你可以通過在瀏覽器的地址欄里鍵入127.0.0.1 或者   http://localhost (默認監視埠為80) 來訪問apache。apache伺服器頁面的默認目錄是 /var/www 。為了把文件放進去,要用root用戶訪問。用root用戶登錄的一個方法:只要以root身份在終端里啟動文件瀏覽程序:

$ sudo nautilus

or if you want to make /var/www your own. (Use only for non-production web servers - this is not the most secure way to do things.)

或者如果你想要使 /var/www 成為你自己的(更改許可權)。(只用於未出示的web伺服器-這不是最安全的做法)

$ sudo chown -R $USER:$USER /var/www

[編輯] 狀態

檢查你的PHP裝置的狀態:

$ gksudo "gedit /var/www/testphp.php"

然後插入這行:

<?php phpinfo(); ?>

用web瀏覽器在 http://yourserveripaddress/testphp.php 或者 http://localhost/testphp.php 訪問這個頁面。

[編輯] 加固Apache

If you just want to run your Apache install as a development server and want to prevent it from listening for incoming connection attempts, this is easy to do.

如果你只是想讓apache以開發伺服器運行並且阻止被企圖連接進來的連接所監聽。這是容易實現的。

$ gksudo "gedit /etc/apache2/ports.conf"
$ password:

修改 ports.conf是之包含:

Listen 127.0.0.1:80

保存文件,然後重啟Apache(看上文)。現在Apache想只服務於你的本地域名,http://127.0.0.1 或者 http://localhost。

[編輯] 密碼保護一個目錄(Password-Protect a Directory)

有兩個方法來密碼保護一個特殊的目錄。推薦的方法有:
編輯 /etc/apache2/apache2.conf。(你需要用root用戶訪問來完成這個工作)。
另一個方法是:編輯目錄里的 a .htaccess 文件來實現保護。(你需要用root用戶訪問來完成這個工作)。

[編輯] (用 .htaccess 密碼保護一個目錄)Password-Protect a Directory With .htaccess

閱讀 EnablingUseOfApacheHtaccessFiles 提示:在很少的一些Ubuntu版本里,.htaccess文件是默認不工作的。.

閱讀EnablingUseOfApacheHtaccessFiles 來幫助啟用它們。

 

[編輯] 略圖(thumbnails)

thumbnails

If you direct your web browser to a directory (rather than a specific file), and there is no "index.html" file in that directory, Apache will generate an index file on-the-fly listing all the files and folders in that directory. Each folder has a little icon of a folder next to it. To put a thumbnail of that specific image (rather than the generic "image icon") next to each image file (.jpg, .png, etc.): ... todo: add instructions on how to do thumbnails here, perhaps usingApache::AutoIndex 0.08 or Apache::Album 0.95 ...

 

如果你讓你的瀏覽器訪問一個沒有「index.html」文件的目錄。Apache將會產生一個 index文件,這個文件會即時把該目錄中所有的文件和文件夾列出來。每個文件夾都有一個相應小圖標在其旁邊。發送一個略圖當做特殊圖像(不是通常的「圖標」)放在每個圖像文件(.jpg,.png,等等)的旁邊:...要做的有:在這裡,也許能附加使用 Apache::AutoIndex 0.08 或者 Apache::Album 0.95 指令來實現 略圖。

[編輯]
已知問題

[編輯] 與Skype不兼容

[4]Skype uses port 80 for incoming calls, and thus, may block Apache.

Skype 的來訪呼叫使用埠80,因此會於Apache衝突。解決的方法是改變其中一個程序的埠。通常埠81是空閑並且工作良好的。在Skype里打開 『目錄>選項』,然後點擊 『高級』 ,然後在來訪呼叫(incoming calls)的方框里寫入你選的埠。

[編輯] 其他Apache選項

  • ServerSideIncludes - 在Apache2里啟用 SSI
  • LocalhostSubdomain - 用你的子區域(子域名)訪問本地的文件

[編輯]
更多信息

  • 建議閱讀 StrongPasswords
  • 如果你想運行一個開放的web伺服器,同樣建議閱讀 BastilleLinux!
  • 你同樣可以編譯 Self:PHP5FromSource,就如同 Self:MYSQL5FromSource一樣。
  • Self:PHPOracle 將使你能連接到 Oracle(甲骨文)資料庫。
  • PhpPear:PHP擴展和應用程序倉庫。
取自"http://wiki.ubuntu.org.cn/index.php?title=UbuntuHelp:ApacheMySQLPHP/zh&variant=zh-tw"
原创粉丝点击