Questions tagged [apache2]
Apache (HTTP Server) /əˈpætʃiː/ is a modular cross-platform web server software with a large variety of features(called modules) including SSL, compression, log, proxy and server-side programming language interfaces like Perl, Python, Tcl, and PHP.
apache2
646
questions
176
votes
35
answers
466k
views
CodeIgniter removing index.php from url
My current urls look like this [mysite]index.php/[rest of the slug].
I want to strip index.php from these urls.
mod_rewrite is enabled on my apache2 server. In config, $config['index_page'] = '';
...
519
votes
32
answers
911k
views
Apache2: 'AH01630: client denied by server configuration'
I get this error when trying to access localhost via a browser.
AH01630: client denied by server configuration
I checked my site folder permissions using:
sudo chmod 777 -R *
Here is my ...
77
votes
6
answers
109k
views
Is it possible to put binary image data into html markup and then get the image displayed as usual in any browser?
It's an important security issue and I'm sure this should be possible.
A simple example:
You run a community portal. Users are registered and upload their pictures.
Your application gives security ...
98
votes
7
answers
143k
views
How can I implement rate limiting with Apache? (requests per second)
What techniques and/or modules are available to implement robust rate limiting (requests|bytes/ip/unit time) in apache?
76
votes
5
answers
120k
views
Is there a practical HTTP Header length limit?
I have a web application that adds contextual information to XmlHttpRequest objects using the setRequestHeader API. I am using a custom header name (e.g. X-Foo) and a JSON structured value. It isn't ...
117
votes
8
answers
148k
views
Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?
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 ...
120
votes
8
answers
507k
views
Configure apache to listen on port other than 80
I use centOS server. I want to configure apache to listen on port 8079.
I added LISTEN 8079 directive in httpd.conf.
I opened port 8079 in iptables and restarted iptables. I even stopped iptables ...
63
votes
2
answers
55k
views
multiple django sites with apache & mod_wsgi
I want to host several sites with under the same server which uses Debian 5, say I have site1, site2 and site3, and assume my ip is 155.55.55.1:
site1: 155.55.55.1:80 , script at /opt/django/site1/
...
11
votes
5
answers
24k
views
Apache2 ProxyPass for Rails App Gitlab
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 ...
68
votes
4
answers
28k
views
Authorization header missing in django rest_framework, is apache to blame?
I've managed to extend TokenAuthentication and I have a working model when using the request session to store my tokens, however when I attempt to pass Authorization as a header parameter as described ...
66
votes
6
answers
18k
views
Vagrant/VirtualBox/Apache2 Strange Cache Behaviour
I'm using Vagrant to run an Ubuntu powered VirtualBox with Apache2.
The webserver, among others, serves static files from my /vagrant directory.
This works well most of the time. But when I change ...
197
votes
15
answers
294k
views
413 Request Entity Too Large - File Upload Issue
I am trying to upload 30MB file on my server and its not working.
When I upload 30MB file, the page loads "Page Not Found"
When I upload a 3MB file, I receive "413 Request Entity Too Large" with ...
181
votes
3
answers
316k
views
Only variable references should be returned by reference - Codeigniter
After the server PHP upgrade I am getting the following error with PHP Version 5.6.2 on Apache 2.0
A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by ...
84
votes
7
answers
87k
views
Need to allow encoded slashes on Apache
I'm currently trying to place a URL within a URL. For example:
http://example.com/url/http%3A%2F%2Fwww.url2.com
I'm aware that I have to encode the URL, which I have done, but now I am getting a 404 ...
23
votes
5
answers
59k
views
.htaccess for cakephp
I'm trying to get a CakePHP application to work. For this, I've set up a brand new Debian installation, updated the configuration and put everything in /var/www, which has the following content:
app
...
9
votes
6
answers
18k
views
Allow one session only at a time
I would like to make my website to allow only one session at a time. For example, let say user has login to my website on firefox, if the user login again to another browser like opera on the same ...
2
votes
2
answers
12k
views
Parse HTML as PHP
Are there any security / performance concerns if we set the Apache web server to configure Apache to handle all HTML as PHP? I was specifically referring to:
AddType application/x-httpd-php .php ....
60
votes
13
answers
113k
views
PHP errors NOT being displayed in the browser [Ubuntu 10.10]
I'm new to PHP and the whole LAMP stack but I've managed to get it up and running on my Ubuntu 10.10 system. Everything seems to be working with the exception of error reposting in the browser which I ...
44
votes
9
answers
96k
views
php.ini changes, but not effective on Ubuntu
I want change the limit of PHP upload file's size
And this is some information of the output my phpinfo:
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/...
13
votes
8
answers
8k
views
How do I ignore the Perl shebang on Windows with Apache 2?
I have set up a local Perl web environment on my Windows machine. The application I'm working on is originally from a Linux server, and so the shebang for source .pl files look like so:
#!/usr/bin/...
10
votes
3
answers
14k
views
RewriteRule that preserves GET parameters
What is wrong with this rewrite rule?
RewriteRule ^api/(.+)$ api/index.php?url=$1 [L]
I simply want "index.php?url=" to be added after api/ and before the rest of the get parameters.
api/image/...
7
votes
2
answers
22k
views
.htaccess rewrite image file to php script
Here is what I have for now in my .htaccess and this should work in future:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{...
51
votes
6
answers
282k
views
ini_set("memory_limit") in PHP 5.3.3 is not working at all
I had this working before :
echo ini_get("memory_limit")."\n";
ini_set("memory_limit","256M");
echo ini_get("memory_limit")."\n";
That would input this :
32M
256M
on a php script executed by ...
40
votes
6
answers
76k
views
Can't remove Server: Apache header
I have "Server: Apache" in my HTTP response headers and want to remove it.
I followed instructions like adding this to httpd.conf:
ServerSignature Off
ServerTokens Prod
Header unset Server
...
164
votes
9
answers
75k
views
Make .git directory web inaccessible
I have a website that I use github (closed source) to track changes and update site. The only problem is, it appears the .git directory is accessible via the web. How can I stop this and still be able ...
52
votes
10
answers
40k
views
OpenSSL not working on Windows, errors 0x02001003 0x2006D080 0x0E064002
Problem: OpenSSL is not working in my Windows environment. OpenSSL repeatedly reports errors 0x02001003, 0x2006D080 and 0x0E064002.
Environment:
Windows NT x 6.1 build 7601 (Windows 7 Business ...
25
votes
1
answer
28k
views
How do I configure Apache2 to allow multiple simultaneous connections from same IP address?
By default, Apache2 seems to allow only 1 connection per IP address.
How do I configure Apache2 to allow multiple simultaneous connections from the same IP address?
Here is my situation:
a web app ...
23
votes
1
answer
28k
views
Setting up Git Server on Windows With git-http-backend.exe
I am in the process of setting up a Git server (1.7.2.3) on a WS 2008 machine using Apache and git-http-backend.exe. I have been following a good tut here. I have the GUI working, I can annoymously ...
14
votes
3
answers
27k
views
How to disable mod_deflate in apache2?
How can I disable mod_deflate in Apache2
For files in a specific directory
OR
For all files that have extension of, for example .py?
13
votes
3
answers
53k
views
Execute Python script from Php
I have a PHP webpage on my raspberry pi with 2 buttons (on and off)
The on button button redirects to On.php
The off button redirects to Off.php
In "/usr/lib/cgi-bin" I have a python script that I ...
165
votes
3
answers
147k
views
What is the difference between the 'sites-enabled' and 'sites-available' directory? [closed]
What is use of these two directories in Apache 2 and how can we do it?
106
votes
14
answers
164k
views
Apache won't follow symlinks (403 Forbidden)
I'm having some trouble setting up Apache on Ubuntu. I've been following this guide.
# /usr/sbin/apache2 -v
Server version: Apache/2.2.17 (Ubuntu)
Server built: Feb 22 2011 18:33:02
My public ...
55
votes
6
answers
120k
views
What is in Apache 2 a "caught SIGWINCH" error?
My server (ubuntu 8.04) LAMP running drupal 6, when there is high traffic, it stops serving pages. A restart of apache2 will not work, so I have to restart the service.
I found this message in the ...
23
votes
4
answers
48k
views
.htaccess: how to restrict access to a single file by IP?
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....
14
votes
8
answers
52k
views
tortoise svn giving me "Redirect cycle detected for URL 'domain/svn'"
I want to achieve a svn-root in /var/svn and repositories(projects) in there.
I could get it to work in the browser (http://domain/url gives me "Collection of repositories") but the TortoiseClient is ...
9
votes
1
answer
9k
views
URL rewriting for different protocols in .htaccess
I need help with url-rewriting in .htaccess.
So the issue is about different protocols: https and http. The main purpose of rewriting is to remove "www" from URL, but protocol should stay the same it ...
50
votes
2
answers
110k
views
How to run multiple sites on one apache instance
Spent hours going in circles following every guide I can find on the net.
I want to have two sites running on a single apache instance, something like this -
192.168.2.8/site1
and
192.168.2.8/site2
...
46
votes
3
answers
76k
views
How to install & configure mod_wsgi for py3
I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3
I'm in ubuntu 12.04
My apache conf file looks like this for py2.7 :
<Directory /var/www/...
38
votes
5
answers
39k
views
How to send compressed (deflated) SVG via Apache2?
I have specified the following attributes in my site's .htaccess file:
AddOutputFilterByType DEFLATE image/svg+xml
DeflateCompressionLevel 9
Header append Vary Accept-Encoding
However, my SVG asset ...
36
votes
11
answers
21k
views
Windows 7 php + Symfony2 terribly slow
This is an issue I've been having for a long time. I want to run PHP applications on my windows computer and it has a terribly high load time, around 10-25 seconds. I have tried many things:
First I ...
30
votes
5
answers
54k
views
How can I implement single sign-on (SSO) using Microsoft AD for an internal PHP app?
I'm vaguely aware that on a computer joined to a domain IE can be asked to send some extra headers that I could use to automatically sign on to an application. I've got apache running on a windows ...
23
votes
3
answers
7k
views
Allowing only single active session per user in Django app
I want to restrict logged-in users to only have one active session, i.e. if the user logs in with a new sessionid, the old session should be terminated.
I found a lot of help on SO already:
here and ...
18
votes
4
answers
18k
views
How Can I Have A Conditional .htaccess Block?
This is an Apache question you've probably come across before. I want to have one source package that I can deploy to my workstation, my staging server, and my production server, but for it to load ...
10
votes
3
answers
29k
views
How to set Php's auto_prepend_file directive per directory?
Background: I've got some code that checks to see if a user has a valid session before processing the php page that I would like to set as the auto_prepend_file. However, I need to exclude the page ...
5
votes
1
answer
4k
views
Is the new APCu APC User Cache shared between processes?
I am planning to use the php5-apcu ubuntu package.
Is the data shared between processes? In other words, if I set a cache entry in one website load, will another website load have the cache entry ...
1
vote
1
answer
16k
views
url routing with PHP and .htaccess
I want to use the MVC pattern to divide my logic, from the presentation and the data.
Well, i've been searching for i while. But the truth is that i don't even know what to search.
I'm trying to ...
0
votes
1
answer
562
views
mod_rewrite - how to rewrite an URL?
Is there a way to rewrite an URL like
http://mydomain.com/getProduct.php?id=1&mode=simple
in
http://mydomain.com/products/1/simple
using mod_rewrite in Apache2?
133
votes
16
answers
474k
views
Could not reliably determine the server's fully qualified domain name
I have just installed Apache 2.2.17, and I am using it for the first time.
Now when I try to start the server using the command service httpd start it gives me the message:
httpd: Could not reliably ...
75
votes
3
answers
281k
views
How to enable loglevel debug on Apache2 server [closed]
My error.log contains:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' ...
71
votes
20
answers
408k
views
Windows could not start the Apache2 on Local Computer - problem
During the installation of Apache2 I got the following message into cmd window:
Installing the Apache2.2 service The
Apache2.2 service is successfully
installed. Testing httpd.conf....
...