Questions tagged [apache]
The Apache HTTP Server is an Open Source Web server, which originated from a series of patches to the NCSA HTTPd. Apache is the world's most popular Web server, which is run on 54.90% of all Web servers according to the Netcraft survey conducted July 2010.
1,182
questions
58
votes
7
answers
187k
views
What is the best Apache logs Analyzer? [closed]
What real-time log analyzer can you suggest for Apache access and error logs?
There is a list of web analytics software on WikiPedia, but it would be great to hear opinions from people with ...
28
votes
2
answers
95k
views
Can I skip the PEM pass phrase question when I restart the webserver?
After buying a multi-domain SSL certificate I have started testing it with the Nginx webserver (following documentation in their SSL wiki page).
Everything is fine, it works and I get a green ...
24
votes
4
answers
123k
views
Allowing access to an Apache virtual host from the local network only
I have a web page on a Linux server I administer, running Apache 2.2. This server is visible to the outside world for some other services.
I would like to configure Apache so that a given virtual ...
24
votes
2
answers
23k
views
htaccess execution order and priority
Can anyone explain to me in what order apache executes .htaccess files residing in different levels of the same path and how the rewrite rules therein are prioritized?
For example, why doesn't the ...
23
votes
9
answers
115k
views
How to Change the www root directory on WampServer
How can i change the root directory of the currently installed wampserver to some other directory.
18
votes
2
answers
12k
views
StartSSL certificate gives SEC_ERROR_REVOKED_CERTIFICATE in Firefox and ERR_CERT_AUTHORITY_INVALID in Chrome
My existing HTTPS certificate is expiring soon so I bought a new one. I'm having a very hard time installing it properly though. I have a wildcard certificate from StartSSL for *.deadsea....
18
votes
1
answer
76k
views
How to pass GET parameters to rewritten URL?
I have an .htaccess rewrite rule like this:
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^search/(.*)$ search.php?q=$1
What this does is, if someone visits http:/...
16
votes
8
answers
3k
views
Does using LiteSpeed instead of Apache speed up WordPress?
I've read that Litespeed is a lot faster than Apache. I use mostly WordPress and Joomla sites and am looking for a new server. Will I see a significant increase in speed of WordPress being on a ...
15
votes
3
answers
41k
views
How can I use robots.txt to disallow subdomain only?
My code base is shared between several environments (live, staging, dev) & sub-domains (staging.example, dev.example, etc.) and only two should be allowed to be crawled (ie. www.example and ...
15
votes
5
answers
955
views
Is it worth looking into a webserver other than apache?
I've traditionally deployed my sites under apache, simply by default. I've heard things about NGinX though and I'm wondering under which conditions it would be superior. In addition to apache and ...
15
votes
4
answers
18k
views
Interpretation of empty User-agent
How should I interpret an empty User-agent? I have some custom analytics code and that code has to analyze only human traffic. I have got a working list of User-agents denoting human traffic and bot ...
14
votes
6
answers
9k
views
Forcing SSL and www in .htaccess
I'm looking for a way to force SSL and www.
I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: ...
14
votes
3
answers
2k
views
What are some great resources for mastering Apache administration?
I've been working with Apache for a couple years now and am comfortable with basic administration and configuration. However, I'd really like to increase my skill set from basic administration to ...
13
votes
2
answers
24k
views
Why does my site only work with a www in the URL?
I'm a bit confused as the following points:
There is a simple text website, with no javascript, that works only with the prefix. http://www.mysite.corporation.com works but http//mysite.corporation....
11
votes
3
answers
29k
views
htaccess redirect non-www to www with SSL/HTTPS
I want a rewrite rule that redirects everything to https:// AND www.
For example http://example.com should be going to https://www.example.com
This is what I have:
RewriteEngine On
RewriteCond %{...
11
votes
3
answers
8k
views
When is the leading slash (/) needed in mod_rewrite patterns?
Here is an example from the Apache documentation for enforcing canonical hostnames:
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) http://www....
11
votes
4
answers
340
views
Cheap server stress testing [closed]
The IT department of the nonprofit organization I work for recently got a new virtual server running CentOS (with Apache and PHP 5), which is supposed to host our website. During the process of ...
10
votes
1
answer
8k
views
Why has Apache begun running a single process as root, and another as root and the wwwdata user?
I am running Apache Worker-MPM, PHP 5.3.2, and FCGID.
Apache runs better than before, but I noticed that there is an apache process running as root and a second process that runs as both root and ...
10
votes
1
answer
1k
views
Why chmod 777 is not secure?
chmod 777 file change the permissions of the file file to read, write,
and execute for all.
Ok, so the file can be manipulated in any way by any script on the server. But why is this not secure?
...
10
votes
3
answers
39k
views
Where/how to put .htaccess files?
I am trying to update/create a .htaccess file for my apache2 server so that my webpages can be accessed without file extensions (e.g. www.example.com/whatis.php can now be accessed as www.example.com/...
10
votes
3
answers
208
views
How do I ensure that my content is sent via gzip in Apache?
Is there some setting that I can search for in Apache configurations to make sure that all pages, CSS, and JavaScript are sent via gzip?
Are they located in different places for different Operating ...
9
votes
3
answers
55k
views
Have disabled apache site config file 000-default.conf, but it still seems active. Why?
I added a file mysite.conf to my apache sites-available folder with the correct settings, then enabled it and reloaded apache, and it isn't working. I want to disable the default site config as ...
9
votes
2
answers
38k
views
How can I use .htaccess to respond with 403 forbidden status for URLs that contain a query string?
Some bots have been crawling my site for every link that ends with:
?utm_source=dlvr.it&utm_medium=twitter
I haven't checked out its IP.
Then other bots (10+) follow the link rules ?utm_source=...
9
votes
1
answer
17k
views
.htaccess rewrite URL leads to missing CSS
I am trying to make my url from this:
example.com/view.php?id=15
To this:
example.com/watch/15
My code in .htaccess is as follows:
Options -Indexes
Options +FollowSymlinks
RewriteEngine On
...
9
votes
3
answers
983
views
Tactics for dealing with misbehaving robots
I have a site that, for regulatory reasons, may not be indexed or searched automatically. This means that we need to keep all robots away and prevent them from spidering the site.
Obviously we've had ...
9
votes
2
answers
3k
views
Is Checking For mod_write Really Necessary?
Recently I noticed that many people post .htaccess files here with:
<IfModule mod_rewrite.c>
Sometimes this even appears several times in the file! It obviously checks to see if mod_write is ...
9
votes
2
answers
1k
views
Apache - How to NOT log 301 redirects
I recently re-designed my site and a lot of the URLs changed. I have already setup rewrite rules in Apache to redirect old URLs to the new URLs. That's all working.
My question is, how can I get ...
9
votes
2
answers
3k
views
HSTS Preload section on .htaccess
Recently having moved a site to SSL, I looked into enforcing HSTS for eventual preload. The syntax is approved and the Chrome List allows it to be OK. However, not being a coder at all, a slight ...
9
votes
2
answers
23k
views
Extend depth of .htaccess to all subfolders and their children
I need to be able to use .htaccess in all subfolders for full depth. E.g. I have .htaccess in public_html folder:
\public_html\.htaccess
How I make it to work for the folder small as well?
\...
9
votes
2
answers
3k
views
Explicit differences between <Directory> and <DirectoryMatch> (and other <*Match> directives)
Preface
I'm very much a neophyte regarding webservers. I'm setting up an Apache2 server and currently poring over the documentation.
I noticed that the <Directory>, <Location>, and <...
8
votes
3
answers
4k
views
How do I temporarily disable a website?
I have to take a website down for a month, which is the least intrusive way to keep achieved SEO optimizations?
should I just add in apache config:
<Directory /root-directory-of-web-site-to-be-...
8
votes
3
answers
41k
views
How to redirect / convert any URL to lowercase?
I am using:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://example.com/$1 [L,R=301]
</...
8
votes
2
answers
11k
views
How to enable compression in WAMP installed on Windows Server?
How to enable compression in WAMP running on Windows Server 2008?
I searched the net and I followed these steps given here: http://www.zigpress.com/2009/04/09/enabling-gzip-on-wamp/.
But after ...
8
votes
4
answers
822
views
Can missing anchors be logged?
If I have a broken link it gets logged with a 404. If I have a link to an anchor and the anchor is missing, I don't get an entry in the log. How can I find those broken anchor links, especially if the ...
8
votes
4
answers
17k
views
Apache logs: "::1 ... "OPTIONS * HTTP/1.0" 200 -
Just looking at logs of a not-so-busy site on one of our Apache servers and notice tons of these in the log:
::1 - - [15/Apr/2011:12:11:40 -0700] "OPTIONS * HTTP/1.0" 200 -
::1 - - [15/Apr/2011:12:11:...
8
votes
1
answer
35k
views
How can I redirect port 80 to a different port with Apache?
I have tomcat running on port 8080 and want a particular URL, lets say http://example.com/app, to actually point to example.com:8080/app
I have other content on the website that should remain ...
8
votes
3
answers
12k
views
How to restart Apache without reseting users sessions?
User is logged-in a PHP website > I restart Apache > User needs to log-in again.
How to prevent this? (I don't want user to need to log-in again)
8
votes
2
answers
2k
views
What is the best practice for redirecting the IP address of a web server when it hosts multiple domain names?
I plan to have 2 separate domain names pointing to the same Apache installation with WordPress multi-site.
I can set virtual hosts correctly for each domain, no problems. I can have both domains ...
8
votes
1
answer
9k
views
Possible to split virtual host definitions into multiple apache conf files?
I have a single server that I use to host a whole bunch of smallish websites. It's recently come to my attention that a service called LetsEncrypt allows me to get an SSL certificate for free. The ...
8
votes
1
answer
11k
views
Rewrite up to three folders into three query string parameters to a PHP script
I'd like to use mod_rewrite within the .htaccess file to rewrite folders to a var string. Below is examples of current and what I would prefer.
Current URL: example.com/main/folder1/folder2/folder3
...
8
votes
2
answers
5k
views
Why is my site getting requests for URLs converted to lowercase?
On my sites I am seeing requests for what would be valid URLs, but with the path converted to lowercase.
For example, a valid URL is example.com/some-product-CAT12P0.html.
In my Apache logs I'm ...
8
votes
1
answer
2k
views
Why am I getting a 301 redirect when I haven't told Apache to give one? Can WordPress push a 301 redirect?
I am setting up a development environment with XAMPP on Windows. Apache version is 2.4.17.
My development url is www.hagertyforjudge.dev, also accessible at hagertyforjudge.dev. I am trying to solve ...
8
votes
1
answer
502
views
Problem with .htaccess and mod_rewrite after moving site to new server
The site seems to draw the correct links but its not redirecting me to the correct view.
The same code works fine on the old server here http://ruse.systemio.net/q&a/.
The new server is here http:...
8
votes
1
answer
1k
views
Permissions for serving up temporary files
I have a system (web based application) which pulls file attachments from a 3rd party system via SOAP. These are in turn on our system created as files in a directory.
When a user of the system (...
8
votes
0
answers
419
views
Installing Comodo software on an Apache-based Modsecurity module [closed]
I am very new to the VPS world and I want to install Modsecurity on my new VPS (Ubuntu 16, Apache, Webmin) after getting many recommendations to do so (already installed CSF-LFD but had many voices to ...
7
votes
2
answers
2k
views
Make Google index over 90,000 user profiles
I have a large amount of user profiles hosted in this schema https://example.com/stats.php?player=name (It's not the prettiest URL, but .htaccess dramatically slows down my site and I don't understand ...
7
votes
1
answer
10k
views
What causes an empty referrer field in a webserver log file?
Given a log line from Apache such as the following:
xx.xx.xx.xx - - [04/Jan/2016:10:42:27 -0800] "GET / HTTP/1.1" 200 6861 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like ...
7
votes
3
answers
5k
views
Where do I create the file .htaccess, in order to serve my HTML5 cache manifest file correctly?
From a post on http://diveintohtml5.org/offline.html (Wayback Machine Copy)
Your cache manifest file can be
located anywhere on your web server,
but it must be served with the content
type ...
7
votes
3
answers
20k
views
Physical memory usage issues with WordPress plugins
Occasionally, my website that's hosted with GoDaddy is crashing due to physical memory overload. My host told me that PHP processes are overloading the server, and to try to find out which WordPress ...
7
votes
2
answers
748
views
Is there any way to diagnose which PHP or Perl scripts consume the most CPU time on a production server?
On a slightly under-powered server, it occasionally gets hit by lots of robots crawling simultaneously. Whilst one solution is to look into throwing more processing power at the web server, it has ...