Shouldn't be a problem with .htaccess, depending on what the host has allowed. You could try putting a .htaccess in the sub-folder withAllow From All Satisfy Any
Showing posts with label apache2. Show all posts
Showing posts with label apache2. Show all posts
Apache authentication : allow public access to a subdirectory edit
Apache: _default_ VirtualHost overlap on port 443 edit
http://www.twopenguins.it/2011/04/apache-_default_-virtualhost-overlap-on-port-443-the-first-has-precedence/
If you have just added another VirtualHost with SSL and Apache is giving to you this error:
[warn] _default_ VirtualHost overlap on port 443, the first has precedence
Probably you miss a
NameVirtualHost *:443
at the top of your httpd-vhosts.conf file.
Debian
데비안에서는 /etc/apache2/ports.conf 파일안에 <IfModule mod_ssl.c>와 </IfModule>사이에 넣어준다.
apache2 + php5 환경에서 큰 파일 업로드하기 edit
Apache2 + PHP5 환경에서 큰파일을 업로드할때 들어온 POST 데이터들을 모두 메모리에 넣은 뒤 tmp에 저장시킨다음 지정된 디렉토리로 이동하는줄 알고 큰파일을 업로드 시킬경우 메모리가 터져나가 안되는줄 알고있었는데, 다시해보니 잘못알고 있었다.
POST 최대 크기값이 각 파일들의 크기값과 같거나 작아서( 단순히
이건 거의 미신수준이다.(하지만 구버전에선 어떤지 모르겠다.)
시스템 환경에 맞게 설정.
업로드되는 각 파일의 최대 크기이며
테스트해보진 않았지만 업로드할 파일의 크기가 매우 큰경우 timeout되어 업로드가 안될경우 늘려주면 될듯.
Apache2(the webserver)
Apache2 웹서버의
http://www.uploadify.com/demos/
php.ini
의 upload_max_filesize
와 post_max_size
를 각각 2G씩 설정했을땐 아예 모든크기의 파일이 업로드되지 않았다.(큰 파일은 끝에서 멈춰버렸고 작은파일은 아예 진행이 안됨) 이유는 모르겠으나 추측하건데 post_max_size
<= upload_max_filesize
) 그랬거나2G
의 G
심볼을 이해하지 못해서 그랬을지도 모른다.(php 공식사이트엔 이해한다고 되어있다.)http://php.net/manual/en/ini.core.php
PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you're using 32bit versions) as it will cause your script to fail.
Myth of 'memory_size'
이건 거의 미신수준이다.(하지만 구버전에선 어떤지 모르겠다.)
http://stackoverflow.com/questions/2854283/writing-direct-to-disk-with-php
I don't believe the myth that 'memory_size' should be the size of the uploaded file. The files are definitely not kept in memory... instead uploaded chunks of 1MB each are stored under /var/tmp and later on rebuild under /tmp before moving to the web/user space.
I'm running a linux-box with only 64MB RAM, setting the memory_limit to 16MB and uploading files of sizes about 100MB is no problem at all! (http://php.net/manual/en/features.file-upload.php)
PHP settings that related to file upload
php.ini
:; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = /home/tmp ; Maximum allowed size for uploaded files. upload_max_filesize = 2000000000 ; about 1.86G ; Maximum size of POST data that PHP will accept. post_max_size = 2147483648 ; 2G max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
upload_tmp_dir
시스템 환경에 맞게 설정.
upload_max_filesize
and post_max_size
업로드되는 각 파일의 최대 크기이며
post_max_size
는 HTTP POST Request의 최대 크기이므로 post_max_size
사이즈를 좀더 크게 설정.('multipart/form-data' is also POST Request)max_execution_time
and max_input_time
테스트해보진 않았지만 업로드할 파일의 크기가 매우 큰경우 timeout되어 업로드가 안될경우 늘려주면 될듯.
http://www.radinks.com/upload/config.php
These settings define the maximum life time of the script and the time that the script should spend in accepting input. If several mega bytes of data are being transfered max_input_time should be reasonably high.
Apache2(the webserver) LimitRequestBody
option
Apache2 웹서버의
LimitRequestBody
의 기본값은 0(무제한)이기때문에 따로 설정되어있지 않다면 만질필요가 없다.http://www.radinks.com/upload/config.php
The apache webserver has a LimitRequestBody configuration directive that restricts the size of all POST data regardless of the web scripting language in use. Some RPM installations sets limit request body to 512Kb. You will need to change this to a larger value or remove the entry altogether.
Client side script Uploadify
http://www.uploadify.com/demos/
참고
- http://phpfile.org/7937/apache2-memory-usage-when-uploading-large-files
- http://aaronwinborn.com/blogs/aaron/how-handle-large-file-uploads
구글링중 발견한 'Apache Commons Java 라이브러리/컴포넌트'는 Apache2 웹서버와 관계가 없다.
http://serverfault.com/questions/109557/best-practice-apache-file-upload
I think you're confusing Apache httpd (Web Server) with other Apache Group projects. Apache Group hosts the "Commons" project which a large collection of Java libraries for use in your own Java applications.
apache2 httpd 컴파일 옵션 지정
http://blog.naver.com/PostView.nhn?blogId=woodair&logNo=100090608241&parentCategoryNo=38&viewDate=¤tPage=1&listtype=0
raw 영상 , DVD 이미지 파일등 그 크기가 2기가 이상을 상회하는 파일들이 넘쳐나고 있는데 이와같은 파일을 웹을 통해 전송하기 위한 리눅스 컴파일 환경설정에 대한 내용입니다.
1. 커널 2.4 이상이어야 하며,
2. Apache2, PHP5 컴파일시 아래와 같은 컴파일 플레그를 지정함으로 2기가 이상의 대용량 처리 환경을 만들수가 있습니다.
shell] # CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" shell] # export CFLAGS shell] # cd httpd-2.x.x shell] # ./configure \ --prefix=/usr/local/apache2 \ --enable-mods-shared=all \ --enable-so .... ....