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
14
votes
2 answers

How to redirect all requests to index.php and keep the other GET params?

Here's what I've got so far: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule .* index.php?url=$0 [L] But when I go to soemthing like /a?b=c and then inspect the GET params, I only get a for url, and b is lost. How can I…
mpen
  • 272,448
  • 266
  • 850
  • 1,236
14
votes
2 answers

AWS ALB redirect to https

My Apache servers are behind an ALB/ELB. I'm terminating SSL at the load balancer. The load balancer listens on both 80 and 443. I want to redirect all http requests to https. I have this rewrite rule in place in the vhost config: RewriteEngine…
yossarian2004
  • 299
  • 1
  • 3
  • 11
14
votes
3 answers

Unable to send email using mailR package

I am getting below mentioned error. I copied mail.jar, activation.jar, mailapi.jar, common-lang3.jar to /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext java.lang.NoClassDefFoundError: javax/activation/DataHandler at…
Sumit Chopra
  • 231
  • 3
  • 5
14
votes
2 answers

Custom domain feature for saas product customers

I have build a saas product with angular 4 integrated with golang rest api and uploaded the build on aws ec2 instance. My project is a multi-tenant based app which loads customers dashboard on merchant-name.mystore.com subdomain but some of the…
Vikram
  • 3,171
  • 7
  • 37
  • 67
14
votes
3 answers

%D field in Apache access logs - first or last byte?

The Apache Httpd manual has a section on custom access log formats. One of these options is the %D field, which is documented as The time taken to serve the request, in microseconds. Can anyone tell me what exactly this is measuring? Is it…
skaffman
  • 398,947
  • 96
  • 818
  • 769
14
votes
7 answers

How to expose my localhost to the WWW? (port forwarding?)

I am running Apache/php on my localhost and would like to be able to make this publicly accessible from the internet. I think this is achieved by port forwarding? Can someone point me in the right direction?
Andy Hin
  • 30,345
  • 42
  • 99
  • 142
14
votes
1 answer

Change permissions of file uploaded by PHP

I have created a small scale CMS for a website I am working on and have a form that uploads image files to be used on the website. It uploads the files successfully but the permissions it sets do not allow the file to be viewed in a browser. Here is…
Max
  • 1,175
  • 3
  • 12
  • 22
14
votes
3 answers

a lots of (Permission denied) in catalina.out

How can i install Apache web server and Apache tomcat to avoid get errors like this: java.io.FileNotFoundException: /usr/local/apache-tomcat-7.0.5/work/Catalina/localhost/_/SESSIONS.ser (Permission denied) in…
Mohammad Ali Akbari
  • 10,345
  • 11
  • 44
  • 62
14
votes
1 answer

Exact Same Request Returns 200 to Postman but 404 to React App

Using Laravel's resource routes, I've set up an API to serve as the back-end of a React JS application. I'm attempting to access the 'update' method currently. I'm using Javascript's fetch() to accomplish this, so its making one OPTIONS request…
CGriffin
  • 1,406
  • 15
  • 35
14
votes
1 answer

Apache Shiro 1.4.0 initialization

I installed Apache Shiro 1.4.0 and was following this official tutorial in order to set it up. When I tried to initialize SecurityUtils with SecurityManager using this code from tutorial: Factory factory = new…
Vasiliy
  • 16,221
  • 11
  • 71
  • 127
14
votes
2 answers

MySQL OperationalError when running a Flask server (Apache) for some days

I have a Flask server under Apache which I'm using as a Rest API for an app and when the server is running for 2 - 3 days it suddenly stops working and raises OperationalError: MySQL Connection not available. The error always happens at the login…
Grender
  • 1,589
  • 2
  • 17
  • 44
14
votes
1 answer

WampServer Apache httpd.exe application was unable to start correctly (0xc0000142) after Windows 10 Creators Update (1703))

The Windows 10 Creators update seems to have hosed Apache's httpd service, which now errors when I first start the WampServer. The official form confirms this suspicion. WampServer version 3.0.6. However, none of the suggested solutions on the forum…
MSC
  • 2,011
  • 1
  • 16
  • 22
14
votes
2 answers

Have Apache Accept LF vs CRLF in Request Headers

I have a legacy product that I'm trying to support on an Apache server and the server only after a recent update began rejecting request headers which only used LF for newlines and it's a tall order to rebuild it because of how old the code base is.…
Nuvious
  • 1,469
  • 2
  • 12
  • 21
14
votes
9 answers

Serving large files with PHP

So I am trying to serve large files via a PHP script, they are not in a web accessible directory, so this is the best way I can figure to provide access to them. The only way I could think of off the bat to serve this file is by loading it into…
Adam
  • 25,966
  • 23
  • 76
  • 87
14
votes
4 answers

Running Python scripts with Xampp

I'm using python 2.7.13 At first the browser was showing the raw code. what I did: Edited httpd.conf AddHandler cgi-script .cgi .pl .asp .py At the top of all my scripts I added this: #!j:/Installeds/Python/python print "Content-type:…
PlayHardGoPro
  • 2,791
  • 10
  • 51
  • 90