Apache Web Server





The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have Apache 2.4 installed on a Windows 2012 server with an external certificate.  I have internal DNS setup to direct the external domain name to the correct server.

I am trying to redirect all internal web traffic to the external web name.  I currently redirect all HTTP hits on the server for the internal name to the external name successfully.  However, I am not able to redirect all HTTPS hits on the server for the internal name to the external name:

http://WEBSITE/                              Redirects to                        https://WEBSITE.External.com/
https://WEBSITE/                              DOES NOT Redirect to            https://WEBSITE.External.com/
http://WEBSITE.Internal.local/            Redirects to                        https://WEBSITE.External.com/
https://WEBSITE.Internal.local/            DOES NOT Redirect to            https://WEBSITE.External.com/
http://WEBSITE.External.com/            Redirects to                        https://WEBSITE.External.com/

Is it possible to redirect HTTPS traffic and rewrite the URL to another HTTPS URL?  What am I missing?

Many thanks in advance!

Upgrade your Question Security!
LVL 12
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Hello Experts,

I have www.mysite.com and ww2.mysite.com

Is there a way to alias/redirect www.mysite.com/portal to ww2.mysite.com/portal and mask ww2 with www?

CentOS 7/ Apache2
I install apache on ubuntu Linux 18.4 with mod security + mod Proxy
form example I have domain name test.com  that is point to above server
I want when I request test.com to be going to for example to other server for example i9 that is on internet.
in short I want to creat somting like a cloudflare
could you please give me the correct configuration ?
please note that the client should not knowing the server.
How can I disable cache from the ubuntu server with php and plesk control panel?
I have ubuntu 14.04 server with plesk web admin on it.
I am facing a problem with all my hosted services:
- when I access a php web service sometimes they dont work, and after recalling it it work perfectly.
- when I download a file on server form http, it freuqet get disconnected.
Any idea on how to solve these issues?
I want to map the name of an actual folder to a dummy folder name used in php / html, using htaccess file.

So on the server I have this real folder called 'mydata' which contains many php files and subfolders.

When I retrieve data from this folder, in php or html files, I want to write the path as 'somedata', instead of 'mydata'; for example: /somedata/mydatafile.php instead of /mydata/mydatafile.php. So the 'mydata' folder name will be always hidden from users for security reasons. 'somedata' is just a name, there isn't an actual folder on the server.

I have a few addon domains beside the main domain, and the same mydata folder exists on each add-on domain too. The structure in cPanel is:


where mysite.com is the main domain and the others are addons.

The htaccess file should map 'somedata' folder name to 'mydata' folder name, in any path in any domain and addon-domain, so I would place it in the root (is root considered where public_html, mysite2.com and mysite3.com sites are?) I prefer to do it without redirect, the simplest way possible for the server.

With RewriteEngine On, I tried the following:

Alias /somedata /mydata

RewriteRule ^mydata/(.*)$ /somedata/$1 [NC,L]

RewriteCond %{REQUEST_URI} ^/somedata
RewriteRule .* /mydata/ [NC,L]

I'm stuck because of the syntax, can we make at least one work...?
On my domain, the .htaccess file looks like this:

RewriteRule ^ not-exists.php

Open in new window

A request for /just-something results in "Not Found". However, this:

RewriteRule ^ not-exists/not-exists.php

Open in new window

results in an Internal Server Error. Why? What is the difference? If both examples would give same result, then I would understand it, but now I don't understand it. So what iexactly is the difference between these two results?

I'm having a cross user session problem in a Java Enterprise application where SSO is implemented via Site Minder. A user who attempts to re-login on his session timed-out window, is logged in as some other user who's session is active with Site Minder.
The fact is that the session id that is active with the second user is given to the first user henceforth he is active with the wrong session id.

This is not reproducible. Any thoughts are appreciated.
I am confused about Nessus Scan vulnerability for Apache Tomcat. My confusion is this is a Workstation and not a server. I do not see Apache Tomcat installed on the Machine.

How does Apache Tomcat work on a PC/workstation ? Program is installed. Where would I find the program to delete or upgrade tomcat?

Apache Tomcat Default File

Description: The default error page, default index page, example JSPs, and/or example servlets are installed on the remote Apache Tomcat server. These files should be removed as they may help an attacker uncover information about the remote Tomcat install or host itself.

Solution: Delete the default index page and remove the example JSP and servlets. Follow the Tomcat or OWASP instructions to replace or modify the default error page.
I have created several ipsets broken up by country.  I need to list the names of the ipsets I have built and I need to know how to have the ipsets persist after a reboot.  I am on a Linux 2 Amazon Apache 2.4 instance.
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

I recently updated to Apache Flex 4.16.1 AIR30 I can no longer do HTTP requests.

Error Message:
  body = ""
  clientId = "DirectHTTPChannel0"
  correlationId = "83285769-41EE-7618-7833-CD43BB74BE6B"
  destination = ""
  extendedData = (null)
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:37813/Webessentials/webessentials/api/version?hostport=" errorID=2032]. URL:"
  faultString = "HTTP request error"
  headers = (Object)#1
    DSStatusCode = 0
  messageId = "DF5A526F-6F62-6D11-F9BD-CD43BC442000"
  rootCause = (flash.events::IOErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = ""
      dataFormat = "text"
    errorID = 2032
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2032: Stream Error. URL: http://localhost:37813/Webessentials/webessentials/api/version?hostport="
    type = "ioError"
  timestamp = 0
  timeToLive = 0
I am on an AWS instance running Linux 2.  I log in to the server via ssh as ec2-user and then sudo -i.  When I try to upload as ec2-user I keep getting permissions denied errors from WinSCP 5.  All of the wordpress files are apache:apache.  I added in ec2-user to the group apache and to the group root.  However, I keep getting the same error it is denied.  I then changed the directory for plugins which is /data/web/abc.com/wp-content/plugins to 777 but still got the same error.

I know that I can change everything upstream to 777 but I don't want to do that.  It seems to me that WinScp is supposed to have an sudo command but the default which I have tried to use isn't what I use on my server.  Once I login via ssh I use sudo -i and then I have root privileges and can do anything.

Please show me how to change the default sudo command in WinSCP to sudo -i? Or, is there another way to upload the files?  If I need to switch to FileZilla I am open to that to if it will permit me to upload to my site.
I have wamp version  3.1.3  i have multiple website and everything work fine ....
i want to enable lets encrypt certificate on on of website:
i do the following steps:
on httpd:
oadModule ssl_module modules/mod_ssl.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
on vhsot file:
<VirtualHost *:80>
 ServerName mydomain.com
 ServerAlias www.mydomain.com
 DocumentRoot "c:/mywebsites/www.mydomain.com"
 <Directory  "c:/mywebsites/www.mydomain.com/">
  Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
 ErrorLog "logs/mydomain.com-error.log"
 CustomLog "logs/mydomain.com-access.log" common
 Alias /.well-known c:/mywebsites/www.mydomain.com/.well-known
and download the last package of  letsencrypt-win-simple
the run the letsencyprt file as admin
press m the 1 then mydomain.com then  4  then 1
its give me validation plugin not found or not created
create certificate failed
i try to brows http://mydomain.com/.well-known
its give me:The requested URL /.well-known was not found on this server.
so where is the problem ?
is there any other way to get i certificate ?
I have recently set up a proxy server using apache. However I randomly receive this message "502 Proxy error : Error reading status line from remote server".
What is supposed to be the proper way to solve this issue?. I mean, I prefer not using fixes like the ones I had to include to getr rid of this error temporally

        SetEnv force-proxy-request-1.0 1
                SetEnv proxy-nokeepalive 1
                SetEnv proxy-initial-not-pooled 1

Open in new window

This is my configuration:

<VirtualHost *:443>
        ServerName subdomain.mydomain.com
        ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
        <Proxy *>
               AddDefaultCharset off
               Order deny,allow
        <Proxy balancer://hostingCluster>
               BalancerMember http://server1:80 timeout=10 retry=3 hcmethod=HEAD hcexpr=ok234 hcinterval=10
               BalancerMember http://server2:80 timeout=10 retry=3 hcmethod=HEAD hcexpr=ok234 hcinterval=10
               ProxySet lbmethod=byrequests
               ProxySet stickysession=PHPSESSID

                SetEnv force-proxy-request-1.0 1
                SetEnv proxy-nokeepalive 1
                SetEnv proxy-initial-not-pooled 1

        <Location /manager>
                SetHandler balancer-manager
                AuthType Basic
                Require valid-user
                AuthUserFile /var/www/.htpasswd
                AuthName "Authorization Required"

Open in new window

We have a local area network. We have a WiFi Router that’s capable of DNS Masquerading. A library website with hyperlinks pointing to an intern server resources. E.g http://ebook.myuniversity.elib/ebook_immanuel_kant_critique_of_pure_reason.pdf Our internal ip address where the resource is located is

This local domain ebook.myuniversity.elib points to the ip
The Masquerading works just fine, if users are in the internal local network. Our external IP for example is, this ip is binded to the local server There is need to provide users with access via the internet. Users can only access via a link imbedded to the external web site. Which points to the

The issue we have now is that the resource could not open because the ISPs could not resolve the link http://ebook.myuniversity.elib/ebook_immanuel_kant_critique_of_pure_reason.pdf

My question is this. Is there a small change we can do on the external website to resolve the resource automatically? I.e. it should be able to detect that the users are not on the local network and point them to

p.s Our external website is based on php running on Apache
PHP website using sessions.  We original started development on our Ubuntu Apache system.  After 99% was complete we uploaded to the intended hosting package and found that the session commands we used and worked fine on our Apache development system would not work on the hosting package.  We were getting header already sent errors, but only on the shared hosting package that we purchased.  So we dove a little deeper and in simple terms we moved the session_starts to the top of the files and that seemed to resolve that issue.  However, not that the code is changed, the website is having problems on our development box.  When we try to access our "ADMIN" section which requires a login, we receive too many redirect errors.  However, the same code works on the hosting package. In the Admin section the index.php (admin is in a subfolder off of the root of the site) it includes our "Navigation" file which is basically the top menu of all of the pages.  In that Navigation file, the line "if(!isset($_SESSION['views'])){header("location:index.php");}" seems to be what is causing the error "ERR_TOO_MANY_REDIRECTS" in the browser.   So there is a two fold question here.  What is the problem with this, and why would it work on our hosting package but not on our development box?   Any help would be GREATLY appreciated.
need to download pdf from site but apache showing below error

response header name 'content-disposition? attachment ' contains invalid characters.

I have add mod_header and called filematch and Location match.
also added addtype octet and pdf also.
still the same issue when downloading.
I need to run a php script on my apache2 ubuntu server, i run php myscript.php and get an error ive never seen before in terminal

"The route is not found, check the URL"

The script is a curl request to register a webhook.

How can i run this script? ive run php scripts many times before from shell with no issues.
Hello everyone!

I was wondering how to set a rewrite rule on the httpd.conf rather than placing a .htaccess on every location

My directory structure:

How to invoke:

My .htaccess content:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^((?s).*)$ index.php?_action=$1 [QSA,L]
Cloud Class® Course: CompTIA Healthcare IT Tech
LVL 12
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.


can Apache Sqoop scale out for load balancing purpose ?
I have web application developed in codeigniter framework (PHP-Mysql based application)
I have task to delete some rows and that action i want to authenticate with USB Token.
I have e-mudhra class-2 ( http://www.e-mudhra.com/ ) USB Token.

I didn't have any idea yet how it can be implement. Please suggest...
Hello, when submitting my form, I get the following error:
Fatal error: Uncaught Error: Call to undefined function odbc_execute() in C:\xampp\htdocs\test\pagea.php:87 Stack trace: #0 {main} thrown in C:\xampp\htdocs\test\pagea.php on line 87

Thanks in advance!
Phpmailer not able to send SSL emails.

I have website that sends SSL emails to a mail server.  I upgraded Wamp and am now using Apache 2.4.33 and PHP 7.2.4 and the mails that were working in the previous version of apache and Php now do not work.  
I get the following error Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting.    
When I look on the mail server I see that it can't decrypt the message
05/13/18 13:56:09      Couldn't decrypt, error 80090330
05/13/18 13:56:09      ME-I0069: (recv) socket [1920] was gracefully closed x.x.x.x before any command received. Remote client closed the connection.

I have enabled mod_ssl in apache and php and openssl  but it is not working.   One thing I did notice is that in wamp it doesn't show mod_ssl under the apache modules in the wampserver interface.

Attached are the conf files
Using a .htaccess file is there a way to hide a directory?  I currently allow people to browse my website's files and folders however there is one directory I want to hide from folks so they don't get confused.  Is this possible?
I need to export a SSL certificate from Apache to IIS10,  How do I do this.

I have root.crt, Intermediate.crt and server.crt and server.key


Apache Web Server





The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.