apache2

PHP 5.3.2, Where do I find php5apache2_2.dll?

允我心安 提交于 2019-12-30 17:05:27
问题 I'm upgrading my local version of PHP to 5.3.2, on Windows. I'm running Apache 2.2 right now. I've downloaded the zipped VC6 version of PHP from here: http://windows.php.net/download/ To my dismay, there's no php5apache2_2.dll file anywhere in the ZIP, and unfortunately Google is no help. I don't understand how anybody manages to get PHP working if there is no .dll available in the ZIP contents. Why would they not include this essential file, and why is there nowhere to download it? It has me

Redirect non-www and non-https to https://www

泪湿孤枕 提交于 2019-12-30 12:13:47
问题 I want to redirect non-www and non-https URLs to https://www for my domain, I actually have the following htaccess, that works ok redirecting non-https to https but still allows to access domain.com without www, RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI}%{QUERY_STRING} [L,R] # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f

How can I use post-commit hooks to copy committed files to a web directory from SVN?

青春壹個敷衍的年華 提交于 2019-12-30 08:13:18
问题 My Ubuntu server has Apache and Subversion installed. I use this server as a staging server, purely for testing purposes. I use Apache to host the web application, and Subversion to keep versioned copies of the source code. My current workflow: Make changes to a file Commit the file to the Subversion repository Upload the file new over SFTP to the Apache public directory View the changes in my web browser I would be much happier if my workflow was like this: Make changes to a file Commit the

Apache with Comet Support

让人想犯罪 __ 提交于 2019-12-29 09:24:46
问题 I'd like to build a multiplayer web game application in which it supports chat. I presume the application will have to handle hundreds of simultaneous connections. I'm planning to host my application in a shared web hosting, which has these limitations (most likely similar to PHP + Comet (long-polling) scaling / hosts): It does not seem I can change the web server. Most likely it's using Apache. Supports MySQL 5, PHP 5.3.x, Perl, Python, Ruby on Rails, CGI (To be more precise, I'll be using

how to increase Apache 2 uri length limit

旧巷老猫 提交于 2019-12-29 05:07:08
问题 I am getting this error in my apache2 log: [Tue Apr 06 09:00:56 2010] [error] [client A.B.C.D] request failed: URI too long (longer than 8190) What setting can I change to increase this limit? 回答1: You would have to set DEFAULT_LIMIT_REQUEST_LINE constant inside of the Apache source code, and recompile Apache. This constant is in the httpd.h header file. After this is done you can decrease request limit using the LimitRequestLine directive. See the http://httpd.apache.org/docs/2.0/mod/core

Return an image to the browser in python, cgi-bin

元气小坏坏 提交于 2019-12-29 00:44:05
问题 I'm trying to set up a python script in cgi-bin that simply returns a header with content-type: image/png and returns the image. I've tried opening the image and returning it with print f.read() but that isn't working. EDIT: the code I'm trying to use is: print "Content-type: image/png\n\n" with open("/home/user/tmp/image.png", "r") as f: print f.read() This is using apache on ubuntu server 10.04. When I load the page in chrome I get the broken image image, and when I load the page in firefox

.htaccess: how to restrict access to a single file by IP?

帅比萌擦擦* 提交于 2019-12-28 03:46:06
问题 I've look all over, but keeps running into same info that talks about directory level IP restriction, which usually looks something like this: Order Deny,Allow Deny from all Allow from 123.123.123.123 Is it possible to have same type of access restriction tied to a page/document? 回答1: This will allow either someone from IP 127.0.0.1 or logged as a valid user. Stick it either in your config or .htaccess file. <Files learn.php> Satisfy any Order deny,allow Deny from all Allow from 127.0.0.1

Apache2 ProxyPass for Rails App Gitlab

こ雲淡風輕ζ 提交于 2019-12-27 11:45:56
问题 I am attempting to setup a proxy with Apache2 so that incoming requests to http://myipaddress.com go to http://localhost:3000/ where I have Gitlab ( a rails app ) running. The following is what I have in my Apache configuration file on Ubuntu 10.04. I can successfully access the gitlab default page initially, but any subsequent requests performed by me by clicking on other pages after that go to a 404 NOT FOUND page. I can manually enter /gitlab/ in front of any of these failed redirects and

Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?

无人久伴 提交于 2019-12-27 11:32:07
问题 It's hard to find Mac-specific answers to this question on the web, so I'm hoping someone out there can put this one to rest for me? My permissions are screwed up on my sites and I'm not sure how to fix them without just slamming a recursive 777 on everything which is quite obviously incorrect. Thanks! 回答1: This is the most restrictive and safest way I've found, as explained here for hypothetical ~/my/web/root/ directory for your web content: For each parent directory leading to your web root

Apache + WSGI: Address already in use: make_sock: could not bind to address

久未见 提交于 2019-12-25 18:42:50
问题 I get the following message when I try to start Apache2: * Restarting web server apache2 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:2080 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. uwsgi is listening on that port: sudo netstat -ltnp | grep ':2080' tcp 0 0 0.0.0.0:2080 0.0.0.0:* LISTEN 884/uwsgi Before that I installed wsgi manually sudo apt-get install libapache2-mod-wsgi