php파일을 웹페이지에서 실행시키면 다운로드받아버립니다.
작성자 정보
- 이하나 작성
- 작성일
컨텐츠 정보
- 2,002 조회
- 0 추천
- 목록
본문
파일업로드시 용량이 두배가 되면서 깨져버리는 현상이 레드헷 버그라고해서 아파치를 다운그레이드하면 해결된다는 말을 듣고 아파치 2.x 대였는데 1.3.29 버전으로
다운그레이드 했습니다.
리눅스깔때 아파치, php ,mysql 다 깔았었구요. php는 4.2.2버전입니다.
> rpm -qa | grep httpd 하니 5개의 파일이 나오길래 5개 다 지워버리고,
1.3.29버전을 소스설치하였습니다.
# ./configure --prefix=/usr/local/httpd
이렇게 해서 make, make install 했구요.
httpd.conf파일은 밑과 같습니다.
php파일을 AddType 해서 다 지정해줬는데도 php파일이 실행이 안되고 다운로드 되버리는 현상이 일어납니다.
configure 명령할때 php 모듈을 추가해서 실행해야한다는 말도있던데
이건 제가 어떻게 해야하는건지 도저히 모르겠네요
좀 도와주세요
ServerType standalone
ServerRoot "/usr/local/httpd"
PidFile /usr/local/httpd/logs/httpd.pid
ScoreBoardFile /usr/local/httpd/logs/httpd.scoreboard
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 16
MaxSpareServers 64
StartServers 16
MaxClients 256
MaxRequestsPerChild 100000
Port 80
User nobody
Group nobody
ServerAdmin someland@ggem24.com
ServerName 218.146.249.50
DocumentRoot "/usr/local/httpd/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/local/httpd/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.php3 index.php4 index.htm
</IfModule>
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/httpd/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/httpd/conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /usr/local/httpd/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /usr/local/httpd/logs/access_log common
ServerSignature On
<IfModule mod_alias.c>
Alias /icons/ "/usr/local/httpd/icons/"
<Directory "/usr/local/httpd/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ "/usr/local/httpd/htdocs/manual/"
<Directory "/usr/local/httpd/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/usr/local/httpd/cgi-bin/"
<Directory "/usr/local/httpd/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</IfModule>
<IfModule mod_mime.c>
AddCharset ISO-2022-KR .iso-kr
AddLanguage Kr .kr
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
<IfModule mod_negotiation.c>
LanguagePriority kr en da nl et fr de el it ja no pl pt pt-br ru ltz ca es sv tw
</IfModule>
AddDefaultCharset off
AddType application/x-tar .tgz
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule mod_setenvif.c>
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
</IfModule>
관련자료
-
이전
-
다음