Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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 suddenly can't seem to access my local websites on my Mac via MAMP. My ddns.log file contains the following:

mamp_dyndns[41389:21445531] DynDNS: [no update] empty username and/or password

Open in new window

I do have my DynDNS username and password stored properly in the MAMP interface, and my DynDNS account is in good standing and is configured as it's always been.

Any help on figuring this out would be appreciated.

What Is Blockchain Technology?
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.


I installed/built apache 2.2.x on a Ubuntu, but I want to completely remove Apache now, but having a hard time.   There is an "apache2" folder in "/usr/local/apache2".    Is it simple as just deleting this folder?  If not, what steps can I take to do this?

I've attached an image/screenshot showing the steps I took to install it if that helps.  I haven't configured or modified anything so I do not need to backup anything at all.  I just want it completely gone if possible.
I have been using wamp server with windows 10 for months without a problem, I don't have skype and IIS is disabled.  It's been working fine until today, now the icon is yellow and it is apache that is not working.  I tried to start it manually and checked again that port 80 is free.  Any ideas what could be causing this?
hi guys

So I am going to be installing an SSL certificate on a Linux Amazon EC2. I created the CSR on this instance so I will need to apply the SSL to it to complete the installation.

It is a wildcard SSL certificate. So then I will need to export this SSL certificate and install it on another instance and turn off the other machine. On Windows I know how to export it as a .pfx and install it on another instance, but I don't know how to do this on a Linux machine. It is an amazon EC2 instance.

Are you able to help me accomplish this? What commands do I have to run to export this and then install it again on the new instance?

Thanks for helping
Here is a short snip of a centos web server log. Clients are connecting every second or so.

What I need is a way to search these logs using the Linux commands line looking for gap, meaning where clients didn't connect with a value such as
seconds, minutes, hours to search for.

x.x.x.x - - [12/Sep/2017:03:40:05 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:05 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:05 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:06 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:06 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:06 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:06 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:07 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:07 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:07 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:07 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:08 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:08 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - - [12/Sep/2017:03:40:08 -0400] "HEAD / HTTP/1.1" 200 0 "-" "otm/1.0.0" "-"
x.x.x.x - …
Let's say for example I have 3 files in my root folder:


I have 2 rewrite rules for dealers and products. The paths start with dealers/.... and products/...

RewriteRule ^dealers/([a-zA-Z-]+)$ dealers.php?region_slug=$1 [NC,L]
RewriteRule ^products/([0-9a-zA-Z-]+)$ product-detail.php?slug=$1 [NC,L]

Open in new window

The rewriting is working fine but the problem is that the css and js links are now not working. The page is "broken" because it can't find the file. For example, in the head I have:

<link rel="stylesheet" href="css/main/style.css" type="text/css" />

Open in new window

I have to change it to:

<link rel="stylesheet" href="../css/main/style.css" type="text/css" />

Open in new window

Is that normal practice or is there a better way than having to change the paths?

The issue is that index.php won't work with ../css. So, I can't have a common header.php to include on all files because of rewrite rules.
Hi Experts,

I'm wondering how to best log access-logs on Apache while using ProxyPass based on <Location>.

Here are 3 things I have in mind that I'm trying to implement:

  1. I would like to be able to identify the STATUS code Apache received from our application server (ProxyPass) and the STATUS code Apache sent to end-user. I'm not 100% sure how to identify these separate status codes as of now based on %s "<" or ">" redirection possibility on documentation.
  2. I would like to know if it is possible to log the server IP (application server) that processed the request on the backend (ProxyPass), where the response is coming from.
  3. Any recommendation on how to log full headers from REQUEST and RESPONSE headers, including POST data?

This is my current log format:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%v\" %D \"%{UNIQUE_ID}e\"" custom

And the VHOST has the following config:

ProxyVia Full
ProxyRequests Off
ProxyPreserveHost On

<Location /admin/>
Order deny,allow
Allow from all

On the above ProxyPass IP (, that IP is a server pool from haproxy load balancer, it has 4 servers, so for each request, I can land on a different server in that pool.

Apache version: 2.2.15

Thank you!
hi guys

I'm trying to access an apache web server that I just took a copy of. The external IP is: If you put that into a web browser, then you literally get a 'www' put in front of that IP address.

It's a linux server running apache. I'm not a developer, but could you guide me into looking at where the actual redirect might be occurring and take it out so that putting in the external IP will redirect it to the correct place? I.e. if I put in then that's exactly where it needs to forward to without a www. coming in front of it.

Thanks for helping
Dear Experts,

I have a client who rebuilt his website, and asked us to do some URL redirects for him. but a certain link I get stumped with, I tried encoding, decoding and everything I could think of to make that work, but still it refuses to work!
Site is hosted on cPanel with Apache WebServer, all redirects except for this one works fine.

Original link:

(Cleints says that the %d7 must be part of the matched URL for SEO reasons)

should redirect to

Any help would be greatly appriciated.

I've been trying to set up a subdomain for development  e.g dev.domain.com

I've created a new dns record in Linode Dns manager for dev.domain.com and also copied the domain.com.conf to dev.domain.com.conf and renamed the Server name and Server Alias to www.dev.domain.com and dev.domain.com in that file.  I also updated the document root to the correct folder on the server /home/public/dev.domain.com/public   then I ran a2ensite dev.domain.com.conf and reloaded apache2

But every time I try to access dev.domain.com I'm geting another site showing up which is the default site on the server.

How can I find the issue here and fix it?
Enroll in September's Course of the Month
LVL 10
Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Referring to above Struts vulnerability, would an encrypted DB have helped
prevent this data leak/loss?  

Does this Equifax & AXA dl come about by issuing an sql command?

There could be other unknown vulnerabilities yet to be discovered so
wud DB encryption had helped?
Suppose i added url like in reverse proxy to access it from outside of my company.and suppose my domain name is aa.bbbb.com .By https://aa.bbbb.com/cuz i can open it from outside.but while opening from out side it is coming as https://aa.bbbb.com/xyz/cuz.please help me out from this issue.

Thanks in advance.
We noticed that when we change some data (images for example) in site that is in /var/www directory apache hesitate to apply thouse changes and for some time we see old images when accessing web site from browser. How to force Apache to apply changes immediately? May be the problem is in some Apache caching? If so - can it be disabled somehow?

I want to have a url that looks like this: http://www.domain.com/dashboard/edit/employee_name

the form to edit is at this location: http://www.domain.com/dashboard/form.php

can someone help me with the correct syntax ?

Thank you
I have a webapp written in PHP.
I am developing on my Mac, then running the website on my own Ubuntu server on AWS.

How should I be storing date/time in my mysql database???
Currently when I test on my mac all the times are right.... but when i run on my ubuntu server its an hour out.

Ubuntu Server is UTC timezone.

Im confused what I should do.
Dear EE,
 We have RHEL 6.5. ...OS running Apache 2.2 web server. Now we need to upgrade it to Apache 2.4. This is a Linux server environment hence no direct connection to the internet . Is there a way we can upgrade to Apache 2.4 using rpm files and what are the quick installation steps ? I am not the original configuration guy for this server so really careful not to break anything. Kindly advise. Thanks !

I want to rewrite an entire directory using htaccess

Examples of original legacy URLs

Open in new window

The new urls would be and rewrote to the original urls
website.com/app/group/id/ //with or without trailing slash
website.com/app/group/id/settings //settings file -> only get param is the group id
website.com/app/group/id/tasks/index.php //Tasks directory
website.com/app/group/id/tasks/task.php?task=taskId //Or website.com/app/group/id/tasks/task.php/taskId
website.com/app/group/id/members/member.php?member=memberId //OR website.com/app/group/id/members/member.php/memberId

Open in new window

There are about 10 -12 directories within the parent directory of "group"

I have successfully created a rewrite condition to accept

using the following condition
RewriteCond %{REQUEST_URI} /app/group/
RewriteRule ^app/group/(\w+)/?$ /app/group/?group=$1 [L]

Open in new window

The problem becomes if i go to any other of the subdirectories within the parent directory of "group"

The group id ("group=id") will ALWAYS be needed with each page

Do i need to create a rewrite rule for each sub-directory?
Is there a way to extract only the group id and leave the remaining url intact (ex: website.com/app/group/id/tasks/task.php?task=5)?
down vote
I am trying to create clean urls by adjusting the .htaccess file

Firstly i want to string out the script type (.php) and then rewrite some of the urls. I have created the following .htaccess file

RewriteEngine on

ErrorDocument  400 /errors.php

RewriteCond %{REQUEST_FILENAME}.php -f   --> Ref A

RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteRule ^logged_in/team/(\d+)*$ /logged_in/team/?team=$1 --> Ref B

Open in new window

I have successfully removed the .php from the urls but cannot get the team rewrite to work.

Essentially, i have a url of


Open in new window

i want it to become

website.com/logged_in/team/id/  --> i want it to be able to have query stings after this as (ref B)

Open in new window

Example of a potential page

Open in new window

With regards to reference A. I have been looking at the following tutorial (https://code.tutsplus.com/tutorials/using-htaccess-files-for-pretty-urls--net-6049)

and noticed they included
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

Open in new window

I dont see a problem with the first but would the second counteract ref A? Should these be included as well?

[root@localhost httpd-2.4.27]# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: Configuring Apache Portable Runtime library...
checking for APR... no
configure: error: APR not found.  Please read the documentation.
Ransomware-A Revenue Bonanza for Service Providers
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

I'm trying to figure out how to have wildcard sub-directories on my webserver. In example:


would go to domain.com/1/ without redirecting



would go to domain.com/1/1.jpg without redirecting.

Any help would be appreciated, thank you!
Hi All,
We have a new Tomcat installation and management have asked me to install a SSL certificate on it, I have absolutely no Java/Tomcat experience but it has a plug on it so it falls to me.

I have found several guides online how to accomplish this and followed them to the letter.

The site loads fine but Crome shows a cross through the HTTPS stating its not secure.

I followed the below guides in sequence.
 I then purchased a Certificate from our approved supplier once received I had both the SLL cert and an Intermediate cert I then followed the below to install them.

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
SSLEnabled="true" keystoreFile="C:\Users\Administrator\.keystore" keystorePass="*********"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreType="JKS" />

What I have tried
I have tried adding keyAlias="tomcat" to the xml above but when I do that the site does not load at all.

Im really struggling any help appreciated.


John H
Hi I'm attempting the access the TMDB API using PHP

using the sample script here on my localhost WAMP I get this error

cURL Error #:SSL certificate problem: unable to get local issuer certificate

Open in new window

Running it on a live site works but I don't want to be running test scripts on a website

I have 3 questions

1. How do I solve the SSL certificate problem:?
2. in the CURLOPT_URL line  how do I substitute 'Kate%20Hudson' for $Name?
3. In the output  how do I access the components? I thought it would be $id = $response->{results}{id};

$curl = curl_init();
$Name= "Kate Hudson";
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.themoviedb.org/3/search/person?include_adult=false&page=1&query=Kate%20Hudson&language=en-US&api_key=2c8a02fa36fb5299dcd97bbc84609899",

$response = curl_exec($curl);
$err = curl_error($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
  $id = $response->{results}{id};
  $name = $response->{results}{name};
  $profile_path = $response->{results}{profile_path};
  echo "<p>  id  [$id] name  [$name] profile_path [$profile_path]</P>";

Open in new window


Open in new window

I am using the below RewriteRule which does what I require. However it effects any other created folders within the "materials/guide/" folder. Can I change it so it only applies to the "materials/guide/details/ folder?

RewriteRule ^materials/guide/([A-Za-z0-9-]+)/?$ /materials/guide/details/index.php?link=$1 [NC]

Open in new window

Or exclude other sub folders in "materials/guide/" if easier?
Apache2 quit working when I was messing with the config files and when I purged it and installed it, it quit working.

After I got it working again PHP wasn't working, so I removed it and reinstalled it and it's still not working.

Then I tried to remove PHP and then remove Apache2. I installed Apache2 then installed PHP and it's not working.

From the terminal

Setting up libapache2-mod-php7.1 (7.1.8-2+ubuntu16.04.1+deb.sury.org+4) ...
dpkg: error processing package libapache2-mod-php7.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I had my Apache2 running good on my development machine.

I changed some site configurations and started running the noip.com's client, even though this is a production machine, to see if I could access it from the world wide web.

I tried to install it in terminal and came across the following error

brian@brian-XPS-13:~$ sudo service apache2 start
[sudo] password for brian: 
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
brian@brian-XPS-13:~$ sudo apt remove apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data apache2-utils
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 121 not upgraded.
After this operation, 501 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 278612 files and directories currently installed.)
Removing apache2 (2.4.18-2ubuntu3.4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
brian@brian-XPS-13:~$ sudo apt purge apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data apache2-utils

Open in new window


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.