現在要修改Apache的伺服器設定由於檔案內容攏長,所以
只擷取其中會修改之處,請上下比對位置後再行修改。
下列2個檔案用任何文字編輯器均可。
[httpd.conf]
關係到讓別人找到你的網站
Windows下的位置開始\程式集\AppServ\Servic Configure Server選 edit the Apache httpd.conf Configure file
Linux下的位置/etc/httpd/conf/httpd.conf
# Port: The port to which the standalone server listens. Certain firewall
# products must be configured before Apache can listen to a specific port.
# Other running httpd servers will also interfere with this port. Disable
# all firewall, security, and other services if you encounter problems.
# To help diagnose problems use the Windows NT command NETSTAT -a
#
Port 80(一般網頁伺服器均為80,除有特別設置,否請勿更改)
大概在第270行
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents.
#
#ServerAdmin-AppServ
#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName localhost(一般預設值均為localhost,有網域名稱也可在此設定,無論是真實網域名稱或動態網域,建議您嘟將網域名稱設定在此,以免網站運作時發生錯誤)大概在第295行
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/AppServ/www"(windows環境值如前,若環境為Linux則是/var/www/hml,初學者建議不要更動位置)大概在第303行
#
# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
無論你做了何種設定及修改,儲存後嘟要重新啟動伺服器,請按下『開始\程式集\AppServ\Servic Control Server最後在Apache Resart』上按下即完成重新啟動。若是Linux系統,請執行『/etc/rc.d/iit.d/htpd restar』即完成。
[php.ini]
關係到檔案上傳及郵件外送
Windows下的位置c:\windows\php.ini
Linux下的位置/etc/php.ini
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On(一定要打開,否則會無法上傳)大概在第490行
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =
; Maximum allowed size for uploaded files.
upload_max_filesize = 10M(單次檔案上傳最大容量)大概在第497行
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
; runtime, you can define these variables by calling define_syslog_variables().
define_syslog_variables = Off
[mail function]
; For Win32 only.
SMTP = xxxx.xxx.xxx(設定外送郵件伺服器,若是Linux系統則空白)大概在第607行
; For Win32 only.
sendmail_from = xxxxxxxxx@xxxx.xxx.xxx(設定外送郵件伺服器,若是Linux系統則空白)大概在第610行
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =usr/sbin/sendmail-t-i(若是Linux系統,上述2項可以不用只設這即可,反之則空白)大概在第613行
[Java]
;java.class.path = .\php_java.jar
;java.home = c:\jdk
;java.library = c:\jdk\jre\bin\hotspot\jvm.dll
;java.library.path = .\
無論你做了何種設定及修改,儲存後嘟要重新啟動伺服器,請按下『開始\程式集\AppServ\Servic Control Server最後在Apache Resart』上按下即完成重新啟動。若是Linux系統,請執行『/etc/rc.d/iit.d/htpd restar』即完成。
莫小立+奧小楓=
Casper(卡士柏) & Pumpkin(南瓜)
請不要在我的部落格留下任何情色廣告!必刪!
留言列表

