Apache Web Server

19K

Solutions

12

Articles & Videos

14K

Contributors

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

Hello experts,

Need some help

We have migrated a website from cpanel accelerated2 to another hosting provider who provided latest version of cpanel. The transfer was successful. However while browsing the website we are seeing below error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@xxxx.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

I have gone through the error logs in cpanel which is logging below error everytime the domain is accessed.

corealert: pid xxxxx /home/xxx/public_html/.htaccess unknown filter provider deflate

At first we though php version 5.4 not installed is the issue, we have installed 5.4 via cpanel and restarted the http webserver but still same error.

Unable to understand where to look for

Any help is appreciated.

Thank you

best regards
0
Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

For rewrite rule in httpd.conf, it seems following condition & rule should apply:
1. If URL contains string "usedirectory=yes"
Rule: Do nothing

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john&usedirectory=yes
Rewrited: No change

2. If If URL contains string ”autoCompleteMembers.do“ and not contains usedirectory=yes
Rule: Append usedirectory=yes to original query string

Like following:
Original URL:https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john
Rewrited:
https://conpoc.acme.com/communities/service/html/community/autoCompleteMembers.do?format=v2&includeGroupMembers=yes&includeExternal=no&member=doe.john&usedirectory=yes

I tried following but not working

<VirtualHost *:443>
     ServerName conn6.win.com
     SSLEnable
     SSLProtocolDisable SSLv3 SSLv2
     RewriteEngine on

     RewriteCond %{REQUEST_URI} ^/communities/service/html/community/autoCompleteMembers.do
     RewriteCond %{QUERY_STRING} ^(.*)format=v2&member=(.*)$
     RewriteCond %{QUERY_STRING} !usedirectory
     RewriteRule ^/communities/service/html/community/autoCompleteMembers.do(.*) /communities/service/html/community/autoCompleteMembers.do?usedirectory=yes  [R=301,NE,L,QSA]

</VirtualHost>
</IfModule>
0
Hi Experts

I need an htaccess rewrite rule to redirect from the following URL format:

xyz.com/ABC123

to the following URL format:

http://abc.com/parm?Search.Active=True&Search.SerialType=1&Search.SerialNumber=ABC123&%23=FIND+ASSET

Note that the part marked in bold is a variable that will change. It can contain one to three letters and/or one to three numbers and can be a minimum of 1 character in length and a maximum of 6 characters in length.

What is the rewrite rule that I need please?

Thanks
0
My site httpS://www.mysite.org and, my subdomain http://subdomain.mysite.org  are working fine. My problem is when I forgot to put httpS on mysite.org (Ex.: http://www.mysite.org) the browser goes to  http://subdomain.mysite.org.

How to solve this problem ?
0
I want a tool that will run through our website once daily and send a report of any broken links it finds. I can do it either in VB and use Access 2003 here at the office or I can install it as a php app on our  web server.

Any ideas?
0
When I execute my PHP program in netbeans it goes to this address
http://localhost/CoffeeWebsite/index.php

But I change the address in my wamp server to port 81. My question is where I do change in the netbeans so that every time when i run my program it goes to that address. My operating system is windows 7

http://localhost:81
0
im trying to get a .htacess files working, so a url such as http://mydomain.com/incidents/32111/comments turns into http://mydomain.com/index.php?P1=incidents&P2=32111&P3=comments, I managed to get it working, but it redirected everything to index.php, including all images, css and js files (which didnt really work), and now nothing redirects

So, what Ive currently got is:-
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_URI} !=/index.php
RewriteCond %{REQUEST_URI} !.*\.png$ [NC]
RewriteCond %{REQUEST_URI} !.*\.jpg$ [NC]
RewriteCond %{REQUEST_URI} !.*\.css$ [NC]
RewriteCond %{REQUEST_URI} !.*\.gif$ [NC]
RewriteCond %{REQUEST_URI} !.*\.js$ [NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

Open in new window


I cant find much documentation around .htacess files so any suggestions would be gratefully received.

Thank you in advance
0
How to I configure XAMPP so that I can use it with net beans?
screenshot.PNG
0
Can you please tell me how to I fix that error? I am using netbeans and wamp in windows 7 environment.
screenshot.PNGscreenshot2.PNGscreenshot3.PNG
0
Hi,

I've spent a few weeks messing around with nginx to get to grips with it before I migrate my Wordpress site, (currently on Apache).

One thing can't work out is, In Apache I have a rewrite (in .htaccess) that redirects any request for

http://www.mysite.com/KB/Article/000001.htm
to
http://www.mysite.com/KB/Article/000001

It's because the site was originally written in flat html and theres thousands of links going to the old URLs.

In Apache this did the trick
-=-=-=-=-=-=-=-=-
RewriteEngine On
RewriteBase /
RewriteRule ^KB/Article/(.*).htm  http://www.mysite.com/KB/Article/$1 [L]
-=-=-=-=-=-=-=-=-

How Do I do the same thing in nginx? I'm assuming I add the redirect to my
/etc/nginx/sites-enabled/default
File, as that the one the test site is using;

-=-=-=-=-=-=-=-
# Default server configuration

server {
      listen 80 default_server;
      listen [::]:80 default_server;

# Set The Root Directory for the Entire Website

      root /var/www/html/;

# Add index.php to the list if you are using PHP

      index index.html index.htm index.nginx-debian.html;

# Add The Server IP Address or FQDN

      server_name 123.123.123.123;

# The following does the WorkPress Rewrites for the permalinks
      
      location / {
        index index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$args;
   
      }

# pass PHP scripts to FastCGI server

       location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param …
0
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

please provide soluation of this error message
0
Hello
I have a problem where my javascript and css files are being read from the cache instead of when I do refresh for new content so it never updates. I am using firefox and wamp server and in firefox disabled privacy.trackingprotection, have selected always look for new pages in web developer tools and put wamp in offline mode.

Is it apache that is caching these files? Here is the exact message in the net tab of firebug. How can I solve this so my content is always updated. Thanks

The request was resolved directly from the cache, so we have no response from the server. See below for the cached response.

Open in new window

0
Hi all,

I'm trying to use the following code to get header information, ultimately I want to test whether information sent from a URL is Gzipped or not. The code I'm using does not appear to give any information about Gzip, even though the server definitely has Gzip enabled.

The context:
$context = stream_context_create(array('http'=>array('method'=>"GET",'header'=>"Accept: text/html,application/xhtml+xml,application/xml" .
                                                                                               "Accept-Charset: ISO-8859-1,utf-8" .
                                                                                               "Accept-Encoding: gzip,deflate,sdchrn" ,
                            'user_agent'=>"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36")
                    ));

Open in new window


The grabbing:
$page = file_get_contents($url, false, $context);

Open in new window


The foreach http_response_header iteration:
 foreach($http_response_header as $c => $h)
                {
                        if(stristr($h, 'content-encoding') and stristr($h, 'gzip'))
                                $content = gzinflate(substr($content,10,-8));
                        echo $content;
                }

Open in new window


The php.ini:
zlib.output_compression = On

Open in new window


The result of print_r($http_response_header):
Array ( [0] => HTTP/1.1 200 OK [1] => Date: Mon, 22 May 2017 12:24:22 GMT [2] => Server: Apache [3] => X-Cache: QuickCache vv2.1.1rc1 - file [4] => ETag: "qcd-19396832.63965" [5] => Vary: Accept-Encoding,User-Agent [6] => Cache-Control: max-age=172800 [7] => Expires: Wed, 24 May 2017 12:24:22 GMT [8] => X-XSS-Protection: 1; mode=block [9] => Connection: close [10] => Content-Type: text/html ) 

Open in new window


Any idea why I'm not getting anything concerned with Gzip returned?
0
Hi all -
What's the best/easiest way to download a few hundred image file off a website if all I have is a list of the complete URL?  I do have access, since I can pull them individually in a Browser, one by one.

The list, as an example, looks like this in a CSV file:

http://example.com/pics/car.jpg
http://example.com/pics/truck.jpg
http://example.com/pics/boat.jpg
    etc...
0
I can't seem to find a way of doing this.
I'd like to move the wordpress .htaccess directives into the httpd.conf in order to speed up the services.
However, I can't seem to make this work and have tried a number of ways.

This is the content of the .htaccess;

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<ifModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

And, the following is the last attempt I tried.

    <Directory /var/www/html>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^index\.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
    </Directory>
0
Hi all -  I am wondering what the best way is to:

#1 Send someone to a certain error-handling web page within a site instead of generating a 404 error in the event of a URL not found.  Something like a "missing" spec or a custom error page?

#2 Send someone to http://example.com/hello.php if they left off the extension and just typed http://example.com/hello

- Brian
0
I've searched and found plenty of explanations but I don't think they apply in our case.

In our case, we have a wordpress site with links to another application that is in the wordpress path.
For example
/html/wordpresssite
/html/wordpresssite/yii-app

Logging is fine for all wordpress stuff but once the user logs into the /yii-app, it seems all we see are these kinds of logging.  x.x.x.x - - [17/May/2017:08:33:41 -0700] "-" 408

Wondering if there is a way to enable logging in the yii app so that all activities will be logged along with the wordpress site or something else which needs to be put into the apache 2.4 config to allow this.
0
Hi,
from IIS, so far I have successful put any registered website as www domain to the public.
The domain is correctly resolve the ISP static ip.
Now working for first time with Wamp, was following a few public guides, but currently nothing make sense anymore. Because the apache open web application always as http://localhost:8080/mywebsite/en?!

Thanks in advance for help

Currently no idea, which info would be helpful for potentional helpers, but as now adding VirtualHosts info. Maybe here is something wrong.
# Virtual Hosts
#
<VirtualHost *:8080>
	ServerName localhost
	DocumentRoot c:/wamp64/www
	<Directory  "c:/wamp64/www/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>
<VirtualHost *:8080>
    ServerAdmin admin@yahoo.com
    DocumentRoot "c:/wamp64/www/chiligarden"
    ServerName mydomain.com   
    ServerAlias www.mydomani.com
    ErrorLog "logs/mysite.log"
    CustomLog "logs/mysite-access.log" common
    <Directory  "/">
		Order allow,deny
		Allow from all
     </Directory>
</VirtualHost>

Open in new window

0
Suddenly today my Centos 6.5 webserver has started sending tons of emails (about Viagra and the like), thousands actually.

The server is a typical LAMP server.

The php script sending emails is always different and has a random name.

The user sending emails is always Apache.

This never happened to me, can somebody suggest some countermeasure? Thanks.
0
Windows Server 2016: All you need to know
LVL 1
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Can anyone spot anything that might be stopping SSL from working. This my first time installing an SSL cert on a server.

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /root/domain.com.crt
SSLCertificateKeyFile /root/domain.com.key
SSLCertificateChainFile /root/intermediate.crt

        <Directory /var/www/html/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <IfModule mod_dir.c>
            DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
        </IfModule>

</VirtualHost>
0
some times if I add any rewrite rules it is simply hitting same multiple times and getting infinite loop.

could you please  share some sample to explain clearly abt what's the Diff between between   [L] and [L, R]
0
Hi, I wonder if you gurus can advise please.

I'd like to use the .htaccess file to re-write a URL on the fly whilst we change some links over time to the new one.

I'd like to amend anything coming in over HTTP or HTTPS to mydomain.gov.uk/capitapay/[any additional paths or URL] to HTTPS://pay.mydomain.gov.uk/[any additional paths or URL]

for example:

http://www.mydomain.gov.uk/capitapay/fund/ctx/index.php 
should be redirected to
https://pay.mydomain.gov.uk/fund/ctx/index.php (also removing the /capitapay)
0
Hello,

I am on magento and having an issue where the query string is getting stripped.

We had the server running http and decided to move it to https, when we did that the query strings are getting truncated when it redirects.

I tried lots of variations but none worked, most broke the website with too many redirects.

Currently:
http://www.domain.com/?test=1
redirects to
https://www.domain.com

https://domain.com/?test=1
redirects to
https://www.domain.com/?test=1

domain.com/?test=1
redirects to
https://www.domain.com

centos7 server

I am not using any htaccess redirects at this moment, they are all being redirected through the index at the moment.

I am not sure why this is so hard to accomplish for me, I would love any help.

Matt
0
Hello, I have a problem on my CentOS 6.5 server related to phpmyadmin.

If I click on Export (not for a particular database, but for all the databases) I get a 500 error, which translated into this error in the Apache log:
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 256 bytes) in /var/www/html/phpmyadmin/libraries/dbi/DBIMysqli.class.php on line 299 

Open in new window


I have tried increasing memory limit up to 512MB in php.ini, but I keep getting this error after restarting apache.

I have also updated phpmyadmin to the latest version my php version allows, but I still get the error.

There are no errors listed in phpmyadmin home page, the configuration should be ok.

Versions: phpmyadmin 4.4.15.10, php 5.4.45, mysql 5.5.48

I managed to export the databases from the command line, so that's no problem, but I'd like to get rid of this error.

There is a ton of php scripts running on the server, but the only memory error I get is this one.

Does anyone have any suggestion?
0
RHEL 6.0
Apache/2.2.15

This environment uses a Windows Server2008R2 server as a CA.
The web server has been configured to accept certificates issued by that CA.
But I think there has been no configuration set for revoking certificates.

The "SSLCARevocationFile" path has been commented out in httpd.conf.

Is there another way I can revoke and/or block access to a specific certificate? Even if it is a manual process that would be fine. I want to test blocking a certificate for which I have all the information.
0

Apache Web Server

19K

Solutions

12

Articles & Videos

14K

Contributors

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.