Questions tagged [apache]

Use this tag (along with an appropriate programming-language tag) for programming questions relating to the Apache HTTP Server. Do not use this tag for questions about other Apache Foundation products. Note that server configuration questions are usually a better fit on https://serverfault.com

Apache web server can be quickly and easily installed for development tasks, especially those related to PHP, Perl, and MySQL, using some packages such as XAMPP.

Note that, by historical convention, the term "Apache" is used to refer to the Apache Server Project (httpd), with which the tag is associated. This point must be clarified because the Apache Server Project is just one of over 350 open-source projects and initiatives provided by the Apache Software Foundation (also sometimes referred to simply as "Apache".)

Use the tag only for programming questions relating to the Apache HTTP Server. Note that server configuration questions may be a better fit on Server Fault.

Latest stable version

Resources

Related tags

,

92396 questions
15
votes
6 answers

PHPMyAdmin max upload size will not change, wrong php.ini file

I have recently reinstalled my server this time with WAMP, previously I was using XAMPP. In phpmyadmin the max upload size for database files is at 2,048kb. I have changed the three variables in php.ini according to several forums and articles on…
imperium2335
  • 23,402
  • 38
  • 111
  • 190
15
votes
2 answers

htaccess if statement

I have the following line in my .htaccess file to select which version of PHP to use: AddType x-httpd-php53 .php This works great in the live environment but doesn't apply to the test environment and breaks the site. Is there a way I can put it in…
geoffs3310
  • 5,599
  • 11
  • 51
  • 104
15
votes
4 answers

How to use a different path name in ProxyPass than the Tomcat context name

I am using Tomcat 5.5.9 and Apache 2.x We are trying to use a path name in ProxyPass that is different than the Tomcat context name. ProxyPass /path http://localhost:8080/contextname However, this does not work. When these two are the same then…
Diptendu Dutta
  • 331
  • 1
  • 3
  • 12
15
votes
2 answers

.htaccess block all but my ip

I'm trying to do a quick htaccess to block all but my ip. I have this order deny, allow deny from all allow from "MY IP" "MY IP" is my ip I can't see if from my ip - is this the correct way to do this ?
ttmt
  • 5,822
  • 27
  • 106
  • 158
15
votes
5 answers

Use HTTP Auth only if accessing a specific domain

I've got several sites: example.com, example1.com, and example2.com. All of them point to my server's /public_html folder, which is my Apache root folder. What do I need to add to my .htaccess file to use http authentication only if the user is…
Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
15
votes
2 answers

How to set for specific directory open_basedir

I have a directory /htdocs/unsecured and I want to limit whatever is in that directory or its subdirectories from accessing anything outside of that directory. Where and how do I set open_basedir for this directory only?
L84
  • 974
  • 2
  • 11
  • 21
15
votes
2 answers

If I echo a statement and no one hears it, does it ever get echoed? (PHP cron job question)

So I have a script that I debug with a bunch of echo statements. This is run every 3 minutes on my server by cron, and I sometimes leave the echo statements in there. They're not going to a browser, they're just going... anywhere? This is a vague…
Alex Mcp
  • 19,037
  • 12
  • 60
  • 93
15
votes
1 answer

Proper .htpasswd usage

Assuming a small (pages < 5) site, what is the proper usage of .htaccess and .htpassword? I recently watched a tutorial from Nettuts+ where this sample code was given: .htaccess AuthName "Login title" AuthType Basic AuthUserFile…
Whymarrh
  • 13,139
  • 14
  • 57
  • 108
15
votes
4 answers

Apache mod_rewrite only if request does not start with '/THEMES/'

I'm writing a CMS in PHP, and now I'm working at the themes feature. I have a .htaccess file: RewriteEngine ON RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)$ index.php?m=$1 RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)/(.+)$ index.php?m=$1&p=$2 If I have a request…
user142019
15
votes
3 answers

ProxyPass, ProxyReverse vs AJP

I currently have a Tomcat + Apache HTTP server setting to serve my Java servlet: ProxyPass /myservice http://localhost:8080/myservice ProxyPassRerverse /myservice http://localhost:8080/myservice This is all fine except that myservice needs to know…
user121196
  • 30,032
  • 57
  • 148
  • 198
15
votes
1 answer

Apache's limit to POST request size

Is there any limit of the POST request size in apache? What is the default value of this limit and is there any way to increase it? If it matters, Rails application is started on this server using passenger.
roman
  • 5,100
  • 14
  • 44
  • 77
15
votes
7 answers

PHP not interpreted, showing in view source

I'm hoping that this will be a useful page for getting started running php code as well as solve the current problem I'm having some very simple code as follows: Practice This is HTML
Mark
  • 409
  • 2
  • 6
  • 17
15
votes
4 answers

How to redirect non-www to www URL's using htaccess?

I have a website say http://www.example.com/ in the root of my website, I have added .htaccess file to redirect any request of http://example.com/ to http://www.example.com/ Recently I have created a new section "Videos" so the URL for videos is…
djmzfKnm
  • 26,679
  • 70
  • 166
  • 227
15
votes
6 answers

Apache .htaccess - applying basic authentication conditionally based on environment or hostname

My dev setup: Mac OSX 10.7.4 / Apache 2.2.21 / PHP 5.3.10 I wish to add conditional logic to my .htaccess files depending on dev vs live environment. for example i want to have authentication on the live server but not on the dev server. i have in…
Devin Emke
  • 181
  • 1
  • 1
  • 7
15
votes
3 answers

Can't connect to memcache

I am trying to connect to memcache as they suggest: $memcache = new Memcache(); $memcache->pconnect('localhost',11211); But i get: Notice: Memcache::pconnect() [memcache.pconnect]: Server localhost (tcp 11211) failed with: Connection refused (111)…
Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378