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.

Filter by
Sorted by
Tagged with
13
votes
2answers
15k 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....
5
votes
1answer
18k views

Help with 301 redirect from subdomain to root domain

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work. ...
2
votes
1answer
3k views

Apache rewrite rule that matches a specific query string

I need to rewrite a specific WordPress URL to a 404 error: ?page_id=15 to 404 How can I match the query string? Apparently Apache doesn't feed that to the rewrite mod...
2
votes
1answer
49 views

How to redirect all that URLs that ends with “-2” to the same link without “-2”?

I have an comparison website based on woocommerce and I have the following problem. I have 1 product from 2 vendors: Vendor 1: https://example.com/lista/ceas-accurist-signature-7220-classic/ Vendor ...
2
votes
1answer
89 views

set header 410 for random generated folder path

I have thousand of error URL with patterns like this https://example.com/feeds/74750882288885xxx/comments/default where 74750882288885xxx is a random number, I need help to set this URL to be 301 ...
2
votes
1answer
2k views

mod-rewrite - sending any URL with “.php/” to 404

I have a substantial number of rewrite rules in place for a variety of reasons such as: disallow indexes, set custom error pages, force non-www, https, strip trailing slash, redirect index.html or....
2
votes
1answer
60 views

Detectify false positive (CVE-2013-1966 on uwsgi/nginx)?

Detectify has laready twice informed me of a vulnerability on my website. It is about CVE-2013-1966 (Apache Struts). However I am not even using Apache, my server runs Django on nginx. Can I safely ...
2
votes
1answer
3k views

Accessing server stats using PHP

There are over 10 stats packages installed in my server (AWStat, Webalizer, etc) and cPanel has an interface to show them in terms of visitors, bandwidth, popular pages, etc. It is possible to access ...
1
vote
1answer
153 views

How to remove slash from directory when there are more rewrite rules in the subdirectories on Apache?

I've an Angular applicaion in multiple languages. After the build process there exist a distribution for each language. These are put onto the server in locale directories: /en/index.html /fr/index....
1
vote
1answer
29 views

Create alias URLs including a path to redirect or forward to other websites

To unify the complex URLs of different social media profiles I want to create forwardings/redirects from my own domain to the domain of the respective profile. For these alias domains I want to use a ...
1
vote
1answer
620 views

Apache not logging referrer in all cases

I have a Wordpress site hosted on Vultr, using Plesk Onyx with Apache + Nginx. I've done this same setup for other sites and never had issues, but for this new site I am seeing some odd behavior when ...
0
votes
2answers
1k views

Apache ERROR : The given path was above the root path

I am using apache web server for my project. I am creating hyperlinks for local files in my system. The hyperlinks are getting displayed but the problem is when i click it says 403 Forbidden and gives ...
0
votes
1answer
25 views

Google Crawl rate & the log file mystery

According to Google Search Console for a website I am working on, Googlebot crawls ~5000 pages per day (min 2500, max 8500). However, when looking at the Apache log files, GoogleBot only shows up ~10 ...
3
votes
4answers
9k views

How can i check how many users can visit my website at the same time?

i have my website on a shared webhosting account. I would like to check how many people can visit my site at the same time without the server slowing down or crashing. I don't have SSH, if that makes ...
5
votes
3answers
3k views

SSLCipherSuite settings not taking effect from Apache ssl.conf, only when duplicated in each virtual host

I have an odd issue. The SSLProtocol config is getting applied in my ssl.conf file but the SSLCipherSuite config is not. I have tested this by changing each option and running scan with Qualys SSL ...
0
votes
0answers
82 views

Mod_rewrite rule for Magento2 to access sku with # in

I have an issue similar to this question Redirect URLs with a # in .htaccess I'm trying to access Magento 2 api at /rest/all/V1/products/sku. This works for majority of products but some have a # ...
2
votes
1answer
52 views

Apache2 on Linux - Virtual hosts only working locally

I just recently started to set up Apache on my Linux computer. I decided to use Virtual hosts because I want to run 2 web sites on the same machine. I set up both config files according to a tutorial ...
2
votes
1answer
66 views

.htaccess - RewriteRule for 404 and query

I am very new to this stuff. I have a website with these RewriteCond/RewriteRule directives. Options All -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}...
1
vote
1answer
52 views

How to map many old URLs to a new host with a redirect under Apache cPanel?

I moved some of the content on my website to an external site. However, a lot of places on the Internet still link to the missing pages, resulting in 404 messages. What is the best method of ...
2
votes
2answers
3k views

Reverse-proxy to hide iframe origin. How does that work?

Somebody told me to use a reverse proxy to make iframe content relevant for the website embedding it. But I can't get my head around how would that work? As I understand it, I would need a reverse ...
1
vote
1answer
35 views

How redirect directly to the final domain URL rather than a chain through variations of `www` and `https`?

When I type example.com in the URL it first redirects to http://example.com then to https://example.com and finally to the https://www.example.com (the original address). Why doesn't it straight away ...
7
votes
1answer
3k views

Deny access to all PHP files using FilesMatch, but make an exception for one file

Currently, using htaccess I am denying access to any PHP file in a directory, but not the JS, PNG, CSS files in the same directory. <FilesMatch "\.php$"> Order deny,allow Deny from all </...
2
votes
1answer
1k views

Redirecting index.html to root + folder index.html to root folder? (multilingual)

I have example.com page. I want a homepage without index.html (example.com/index.html -> example.com) RewriteEngine On RewriteRule ^index\.html$ / [R=301,L] RewriteRule ^(.*)/index\.html$ /$1/ [R=301,...
0
votes
1answer
45 views

Is Apache hosting better for a WordPress site? [closed]

I have a legacy (early 2000s) Windows IIS hosting package on a company that originally was for a static html site. I have since created a WordPress site on a subdomain of the old one. The problem is ...
2
votes
1answer
205 views

Redirect hundreds of subdomains to the main domain with path forwarding, use .htaccess?

I want to redirect from a subdomain to domain along with URL path forwarding. Example: abc.example.com/products.html TO another.example/products.html The trailing URL should be preserved. We ...
4
votes
2answers
2k views

Apache not working on AWS Linux after reboot - 301 Response code

I have setup an EC2 instance with the Amazon Linux image and installed LAMP and Wordpress as per the Amazon docs. It works fine, serves the default Wordpress page, but as soon as the instance is ...
1
vote
1answer
30 views

Change server structure to be able to view files/folders in browser (Dedictaed server)

I'm trying to deploy Wordpress on a red hat Linux server (dedicated server). I'm trying to access it using the normal URL structure [IP]/[rootfoldername]/[nameofthefile] but it's not working. Note ...
1
vote
0answers
114 views

Which browsers handle client-side compression of requests such as POST'ed formdata?

Which browsers handle client-side compression of requests, such as "multipart/form-data" transmitted by the client to the server via HTTP POST ? The HTTP server I am trying to get this working with ...
3
votes
1answer
2k views

Proxy a domain from one server to another and retain domain name

I have a single external address that points to a server that is serving multiple domains using virtual hosts. I would like to serve one of the virtual hosts on a new physical machine and am trying to ...
1
vote
1answer
879 views

How can I change URL Letters from Upper to Lower case in htaccess for a specific folder?

I'm a bit stuck, so thank you for any help! In short I'm trying to convert either of the two examples (I have mod_rewrite from the first to the second already). I only want this to apply to the ...
3
votes
1answer
724 views

Apache redirect all requests for file type to 404

I have some .inc files that I want blocked from being accessible via web pages. I want to simply redirect them to another page or throw a 404 when those files are accessed. I have tried this so far ...
1
vote
1answer
105 views

subdirectory htaccess url rewrites

I have a project with this skimmed structure: -proj -----pages ---------example -------------pages -------------.htaccess ---------.htaccess I managed to get it working so that all url's go to /...
3
votes
3answers
1k views

Fastest way to redirect dead URLs to home page

A client of mine scrapped his entire wordpress site of many years for a custom CMS. The URL structures both use the /<post_title> format, so a pattern based .htaccess rule is out of the picture ...
2
votes
2answers
50 views

Apache: sd.example.com and sd.example.com/sd both work - how to disable?

I've got a vhost set up for sd.example.com. DocumentRoot is htdocs/sd. Browsing to sd.example.com works as expected. But if I browse to sd.example.com/sd, I get the same result. Is this expected ...
22
votes
9answers
106k 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.
2
votes
2answers
1k views

Restrict access for a virtual URL path that is reverse proxied from Apache 2.4 to Tomcat backend

How can I configure restriction for URL generated by opencms application on Apache Tomcat? I tried <Location "/cs/intranet"> order deny,allow deny from all allow from XXX.XXX.XXX.XXX </...
2
votes
1answer
744 views

How to configure .htaccess to rewrite all requests into a folder, except a list of exceptions

I have an established website with some legacy folders I would like to keep. https://example.com/.well-known/ https://example.com/Music/ https://example.com/Rutabagas/ I've also installed ...
3
votes
3answers
2k views

How to remove /index.html

How to make redirect /index.html -> / in Apache? Redirect /index.html http://domain-name.com/ Is causeing infinite loop when opening home page.
2
votes
2answers
189 views

Rewrite Issue on index.html

I have index.html on my html_directory on my website also I entered a rule as follows: RewriteRule ^index.html$ newindex.php It seems requests to my site is routing to my index.html file , my ...
3
votes
2answers
3k views

Using one index file in all directories and subdirectories

I have an index.php file, which processes content of a directory it is located in and renders output to the browser. The problem is that the directory structure it is supposed to serve is rather ...
10
votes
4answers
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 ...
1
vote
0answers
110 views

Wordpress Multisite with own domain, Webmin/Virtualmin

I am using CentOS 7.6, Webmin 1.930, Virtualmin 6.07 Pro. and Wordpress Multisite (5.2.3) and have it all working but can't work out how to setup a domain for each Multisite. I think I need to ...
2
votes
1answer
11k views

How to log username in Apache logs?

I need some help regarding how to log the user-name into apache logs. I'm building a use-case for Security Information Event Management. Is the method the same in case of IIS or just applicable to ...
15
votes
4answers
15k 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 ...
4
votes
2answers
1k views

X-Robot-tag noindex not appearing in header

I am trying to include the following in my response header to all resources in multiple directories (dirone/dirtwo/dirthree/direfour) from an Apache server. X-Robots-Tag: noindex, nofollow In my ...
1
vote
0answers
69 views

Hosting multiple websites using MAMP without exposing sensitive files?

So here's the thing, I've created 3 projects which I would like to somehow host simultaneously so that each of them can be viewed at any time. Currently, I am hosting them myself using MAMP, however, ...
1
vote
1answer
86 views

Setting up Grav as a subdirectory on existing website

I followed the instructions from here (part 4 only) for setting up Grav. I already have an existing website which is at var/www/html on my web server, and the home page is an html file called index....
1
vote
1answer
137 views

Abuse on server, thousands of hits on /error/list/socks5.php

For several months now, I've been noticing several IPs randomly hitting our server without providing any virtual host. These hits are all 404 errors and repeat every second for a period of time. ...
13
votes
6answers
8k 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: ...
0
votes
0answers
19 views

How to point my domain to a my server's IP address and configure it to show my website? [duplicate]

I'm doing website on the Linux server (still learning) And I have on 1 IP address to host many web sites. I will have them separately. For example 104.000.0.000:203 for one website and 104.000.0.000:...

1 2
3
4 5
23