[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


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 updated a website that has been around for a while. I checked to see what the url looks like if I search for it on Google and it is www as opposed to not having www. I wanted to keep that but also force a redirect to https as the site was http. I have added a SSL certificate so it should be https.

I have done this in the root .htaccess file, bearing in mind this is a php MVC structured project (just mentioning in case that matters at all).

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{HTTPS} off 
 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 RewriteRule ^$ public/ [L]
 RewriteRule (.*) public/$1 [L]

Open in new window

So, this works fine if I click on the link from the google search results and if I type www.mysite.com directly into the browser url.

But, if I just type in mysite.com then it loads the site but doesn't force the www and some things on the site do not work anymore.

Console gives me a bunch of these errors:

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

So, firstly, what is the best way to fix this and secondly, am I not meant to choose a preferred version and somehow state that via a canonical tag or something along those lines. I am concerned google will think there is duplicate content if both www and non www sites work or is that not an issue?

Any advice would be appreciated.
Acronis True Image 2019 just released!
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

On a new RHEL 7.5 server, I'm trying to get mod_fcgid to run on a simple perl script. I had previously been using mod_perl on an older server, with no issues.  I have confirmed that fcgi_module is installed and running. Server is Apache 2.4.6.

AddHandler fcgid-script .fcgi

print "Content-Type: text/html\n\n";
print "hello world";

Error log:
[Fri Oct 12 17:33:50.655808 2018] [fcgid:warn] [pid 13551] (104)Connection reset by peer: [client xxx.xxx.xxx.xxx:xxxxxxx] mod_fcgid: error reading data from FastCGI server
[Fri Oct 12 17:33:50.655891 2018] [core:error] [pid 13551] [client xxx.xxx.xxx.xxx:xxxxxx] End of script output before headers: hello.fcgi
Dear Experts

We are running web server ( which is on lamp stack and database server mysql is on another server, users are complaining the application is taking too long time also on prospect conversion takes too much time and finally timeout approx 3 mins then time out , when check the network statics below is the continuous report, please let me know what does this indicate, what could be the solution

tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0      0           TIME_WAIT
tcp        0     …
We have a few odd formed urls that we're trying to redirect. They all look like this but with different 5 letters after the .html, this is how I tried making the redirects work:

redirect 301 /woodinville-carpet-cleaning.html/UPfMZ/ https://andersoncarpetcleaninginc.com/professional-home-carpet-cleaning-services-woodinville/

They won't redirect though. All the normal urls in the htaccess redirect just fine, so I know there isn't an issue in the file itself. Anyone have a solution to make them redirect as we expect?

Thanks for any help.
I am encountering HTTP Status 404 - Not Found  accessing a http://localhost:8080/sample/ application.
Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

I can only assume it is caused by my Apache Tomcat configuration, because I am yet to get it working. I am running version Apache Tomcat/7.0.91 on Redhat 7 in AWS. I have installed and integrated Winbind and the OS is happily talking to my AD domain example.com. It can see groups and users and I have masked the domain format 'example/user1' so it appears as 'user1'.

I have downloaded and installed sample.war from https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/ into my tomcat installation /usr/local.tomcat7/webapps/ directory.

My  /usr/local/tomcat7/conf/server.xml configuration looks like this:
<!-- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
<Realm className="org.apache.catalina.realm.JNDIRealm"

Open in new window

My /usr/local/tomcat7/webapps/sample/WEB-INF/web.xml file looks like this:

Open in new window

I am hosting a couple of web sites on couple Linux boxes and OWA on a Windows box in my office. Currently http is forwarded to Host_W and https is forwarded to Host_M.  Host_W serves pages for www.site-m.biz, www.site-d.net, and www.site-f.com while it forwards requests for host_l.site-s.org and www.site-s.org to Host_L. The current structure looks like this:
Current Config
What I want to do is forward both http and https to Host_W while serving the same three sites and forward https requests for mail.site-m.biz to Host_M and requests for site-s.org to Host_L. The structure would look something like:

Disired Config
 I have attached sanitized copies of what I think are the relevant config files.
The port forward is not a problem, simple change on the firewall. Installing Let's Encrypt certificate on both Nginx and Apache2 are heavily documented and a Godaddy certificate for mail.site-m.biz is already installed on Host-M.

What I don't have a handle on is the changes needed on the Apache2 on Host_W. I think it would be just to add something to the site-m.biz.conf like (and something similar to site-l.org.conf):

<VirtualHost *:443>
        ServerName mail.site-m.biz

        SSLEngine On
        SSLProxyEngine On
        ProxyRequests Off
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off
        SSLInsecureRenegotiation on
        SSLProxyVerify none
        SSLVerifyClient none

Open in new window

I am having some problems. I switched over from one e-commerce system to another a while back and this changed the url structure of some of the pages. I was fine with this and set up some rewrite rules. Somehow this has stopped working and I am not sure why.

I need to change

  • /product/{Category-Name}/{URL} to /{URL}
  • /ecategory/{Category-ID}/{URL} to /{URL}
  • /manu/{URL} to /{URL}
  • /news/{category-name}/{URL} to /blog/{URL}

I am using

RewriteRule   ^/?(product|ecategory)/([^\/]+)/(.+?)\$  /$3  [R=301,L]
RewriteRule   ^/?(manu)/(.+?)\$  /$2  [R=301,L]
RewriteRule   ^/?(news)/([^\/]+)/(.+?)\$  /blog/$2/$3  [R=301,L]
RewriteRule   ^/?(newscategory)/([^\/]+)/(.+?)\$  /blog/$3  [R=301,L]
RewriteRule   ^/?([0-9]+)/(.+?)\$  /$2  [R=301,L]

Open in new window

But this is not working now and I don't have enough knowledge of htaccess redirects to work out what is wrong. I have been making changes and looking online but I feel like I am going in circles and this is very confusing.

Please, can anyone give me some advice?
Hi, I am running techgardens.com/optical-engineering.

My client is creating pages at techgardens.com/optical-engineering/ciena, techgardens.com/optical-engineering/Infinera, techgardens.com/optical-engineering/Coriant, techgardens.com/optical-engineering/BTI, techgardens.com/optical-engineering/JDSU.

She would like, when someone clicks on a link for one of those pages, that they see the page, but the url reads  techgardens.com/optical-engineering/.

I think I can do this with htaccess, but need some help. The WP htaccess already has this:

# BEGIN WordPress
AddHandler application/x-httpd-php70 .php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /optical-engineering/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /optical-engineering/index.php [L]

Can I alter that to read:

# BEGIN WordPress
AddHandler application/x-httpd-php70 .php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /optical-engineering/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /optical-engineering/index.php [L]
RewriteRule ^ciena/?$ /
RewriteRule ^Infinera/?$ /
RewriteRule ^Coriant/?$ /
RewriteRule ^BTI/?$ /
RewriteRule ^JDSU/?$ /

And will that give me the result we want? Thanks!
I have an old website that runs on Neowebscript, which was an extended version of TCL for Apache.  Does anyone know any web hosts still hosting Neowebscript sites, or downloadable versions of Neowebscript that will run under an up to date version of Apache or IIS ?
when you use a 3rd party to host your website, where does the responsibility typically split in terms of the technology stack on who has to apply patches to all the relevant components of the web stack? e.g. do they typically patch your CMS and any underlying databases, or only lower levels of the stack?
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

I am running WHMCS software used for billing which is built using PHP & MySQL. Recently we have been receiving some issues when it is accessed through API by our Payment gateway 2Checkout.com.  

Apache access log shows following lines which shows the server got 500 internal server error: - - [13/Sep/2018:10:54:58 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:59 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:59 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:58 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:55:00 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:58 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:58 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:58 +0500] "POST /modules/gateways/callback/tco.php HTTP/1.1" 500 27 "-" "Jakarta Commons-HttpClient/3.1" - - [13/Sep/2018:10:54:58 +0500] "POST 

Open in new window

Dear EEs, is there any free software for Linux which can serve similar like Online Office server in Window?

We'd like to edit document online on web browser on OwnCloud.

Many thanks!
Dear Wizards, I'm testing the owncloud in Ubuntu 14 but got these troubles:
1. the LDAP features are unavailable, I tried to reboot server but it did not help, we had php5-ldap packages


2. Can we edit documents online like GoogleDrive?

Can anyone help please? Many thanks!
Dear Experts

it is observed the  crm application running on LAMP stack often crashes, users unable to use the application webserver is on one server and database mysql 5.5 is on another server did perform the mysql tuner and attached is report, the system has 64G RAM as per the recommendations from mysql tuner can I set my.cnf as per the following, please suggest
total physcial ram capacity is 64G
based on the mysql tuner recommendations should I have to to set as per the below
innodb_buffer_pool_size = 55.2G
innodb_log_file_size= 25% of above i,e 55.2 which is 13.75G
please suggest can I change in my.cnf as above.
Dear Experts

application server web-based of LAMP stack becomes extremely slow and makes application unable to use, web-server(application file system) is having 16GB Ram and database server is separate with 64GB ram and did run mysql tuner attached for your reference below posted recommendation section, when try to set values as recommended mysql fails to start  withe following error log, please help on what values to set so that below error is fixed, thank youmysqltuner12.txt
Plugin 'InnoDB' init function returned error.
180911 14:18:19 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
180911 14:18:19 Unknown/unsupported storage engine: InnoDB
180911 14:18:19 Aborting

Below -extract of recommendations section from the attached

-- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Control warning line(s) into /var/log/mysqld.log file
    Control error line(s) into /var/log/mysqld.log file
    Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )
    Restrict Host for user@% to user@SpecificDNSorIp
    MySQL was started within the last 24 hours - recommendations may be inaccurate
    Reduce your overall MySQL memory footprint for system stability
    Dedicate this server to your database for highest performance.
    Adjust your join queries to always utilize …
please advise the clear steps..
How to make log rotation by file size in apache-tomcat
os: centos 7
apache 2.4.6
mysql 5.6.41

my configuration is in /etc/httpd/sites-enabled/mySite.com

<VirtualHost *:80>

DBDriver mysql
#DBDParams host=localhost,dbname=myDB,user=root,password=*****
DBDParams "dbname=myDB user=root password=*****"
#DBDParams host=localhost,dbname=myDB,user=root,password=*****,sock=/var/lib/mysql/mysql.sock

#DBDParams "host= port=3306 dbname=myDB user=root password=***** sock=/var/lib/mysql/mysql.sock"

DBDMin  4
DBDKeep 8
DBDMax  20
DBDExptime 300

<Directory "/path/to/Dir">

AuthDBDUserPWQuery "SELECT user_passwd FROM myTable WHERE user_name = %s"
#AuthDBDUserPWQuery "SELECT encrypt(user_passwd) AS password FROM myTable WHERE user_name = %s"
  AuthType Basic
  AuthName "site"
 Require valid-user
     AuthBasicProvider socache dbd
 #   </RequireAll>

    ServerName www.mySite.com
    ServerAlias mySite.com
    DocumentRoot /Path/to/Dir
    ErrorLog /myPath/error.log
    CustomLog /myPath/requests.log combined


Open in new window

After entering the username and password I get an "Internal Server Error" message.
My error log..

[Mon Sep 10 09:42:55.454763 2018] [dbd:error] [pid 32515] (20014)Internal error: AH00629: Can't connect to mysql: Access denied for user 'root'@'localhost' (using password: NO)
[Mon Sep 10 09:42:55.454833 2018] [dbd:error] [pid 32515] (20014)Internal error: AH00633: failed to initialise
[Mon Sep 10 09:42:55.454854 2018] [authn_dbd:error] [pid 32515] [client] AH01653: Failed to acquire database connection to look up user 'mark'

Any ideas?
Dear Experts

We have hosted CRM application  on-premises which is web-based and every user has email settings to be configured, the email server is on internet and also other integration like SMS(sms service provider is on external network) and third party applications, all these were perfectly working until the recent changes at the gateway level and internal IT policy,  I suggested them may be the crm servers are not allowed to talk to the external network of email server and sms service providers,.
please find the attached error logs captured, and these the crm server is of windows server 2012R2 can you please help on how to test and confirm to them based on test result like the issue of connectivity, is it recommend to telnet from the web-application crm windows server to the destination email server/sms sever provider server with the ports -- is this the right way OR any other way to check and ensure the necessary ports and access at the gate way/firewall is opened or not, please suggest.
This is a follow on question to https://www.experts-exchange.com/questions/29115269/Why-Does-Mysql-Keep-Increasing-Memory-Usage.html

Now it appears that the memory leaks are coming from php-fpm and Apache.

Please tell me how to isolate what is using up the memory so quickly.

In less than an hour I have lost .9 GB.
Exploring SQL Server 2016: Fundamentals
LVL 12
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Dear Experts

in linux server of centos,  we are running crm which is web based application apache, mysql and php once in few hours users are getting timeout and this is affecting very badly,
1. would like to fetch the log reports of server resources consumption like  RAM, CPU to understand the issue is occurring due to over load of that particular time.
2.  would like to fetch apache logs and mysql logs of that particular time
to determine the time that users are facing issues of application time out , Can I ask software developer to provide me time out occurred and application closed  date and time and during that time check the server resource utilisation which will help me to trace the issue is it due to server or application level.
please help on best practice on such cases.
i have a apache with mod security enable
i want to create a rule that block any page contain when open  for example c:\windows
Dear Experts

We have hosted web based application which runs on linux, apache, mysql and php. data security is top most priority, we have installed ssl certificate and also deployed two factor authentication, when used the online ssl checker by going to https://ssltools.digicert.com/checker/views/checkInstallation.jsp  after the scan following shows up

1. Vulnerabilities checked
Heartbleed, Poodle (TLS), Poodle (SSLv3), FREAK, BEAST, CRIME, DROWN
Non-critical issues found
Not mitigated server-side BEAST.

2. Secure Renegotiation: Enabled
Downgrade attack prevention:Enabled
Next Protocol Negotiation: Not Enabled
Session resumption (caching): Enabled
Session resumption (tickets): Enabled
Strict Transport Security (HSTS):Not Enabled
SSL/TLS compression:Not Enabled
Heartbeat (extension):Enabled
RC4:Not Enabled
OCSP stapling:Not Enabled

Please help me to understand on above 1 and 2  and let me know the steps correct as per the best practice. thank you.
I need to remove an encoded ? (%3F) off of several url's.  I want to use Mod_Rewrite to accomplish that.  Here is my regex but it itsn't working.

RewriteRule ^index\.php\?controller=cms&id_cms=([0-9]+)%3F$ /index.php?controller=cms&id_cms=$1 [R=301,L]

Open in new window

This is what the original url looks like

Open in new window

Please tell me how to get rid of the %3F appended to the url.
I need to upgrade fail2ban 0.8.14 to 0.10.3.  I am on a Linux 2 server which prevents me from loading any repositories or using Yum to install it.

So, I need to know the steps to get my fail2ban upgraded.  

I am using WAMPSERVER 3.1.0 which incorporates Apache. I followed this tutorial to create an ssl certificate and use https on my site. I purchased a Godaddy certificate and it works with https://localhost but does not work with https://mydomain.com. It's like it cannot find it, however http://mydomain.com does work.

Any help would be apprecaited!

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.