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
0
votes
0answers
9 views

mod_headers check for existence of multiple cookies and perform a function only on those cookies

I have a requirement on Apache 2.4 wherein I'd like to check for specific cookies and set the HTTPOnly plus Secure flags only on those Cookies and ignore other Cookies. E.g. On browser I have the ...
0
votes
0answers
8 views

How to configure Apache to Relay/Proxy Requests to Localhost Port? [closed]

Note: I have read several possible solutions to my question but some are old, the syntax of httpd.conf has changed and/or do not correspond exactly to my situation. I am simply trying to find the ...
1
vote
0answers
23 views

Remove PHP extension from URLs such that the URLs work with or without a trailing slash

My directory structure is - Assets - Dashboard - index.php - account.php index.php about.php verify.php What I basically want it to be: Remove the .php extension for example http://example.org/...
1
vote
2answers
24 views

How to parse Apache access log for 404s not from bots?

The regex is easy for 404s in a typical Apache log: grep ' 404 ' access_log But many are coming from bots, which I don't care about. I'm looking for actual people hitting 404s. So I'm trying to ...
1
vote
2answers
49 views

How to redirect some URLs to another local port with .htaccess?

I have the .htaccess file in the root public_html directory. It contains the following: Options -Indexes Redirect / /dali RewriteEngine on RewriteRule ^api/(.*[^/])/?$ http://%{HTTP_HOST}:5000/$1 [R=...
1
vote
1answer
17 views

Apache serves .svg file without Content-type header

Apache is serving an .svg file, but the HTTP response does not have a Content-type header. Consequently, Chrome is displaying the text of the .svg file, rather than the desired image. My goal is for ...
0
votes
0answers
17 views

Is it possible to make a website without paying money? [duplicate]

Is it possible to host your own website and have your friend access it from somewhere else without having to pay a dime ? I know that you can probably host a website from your own system using apache ...
2
votes
1answer
41 views

Configure Apache to show a custom page rather than my host's default when a user cancels logging in via basic authentication

I have a protected directory on an hosted IONOS server. It correctly works when the correct credentials are entered, but when a user hits cancel, it redirects that user to the hosting provider's promo ...
1
vote
1answer
16 views

Why I am not seeing HTTP 304 response codes in my Apache logs?

Why I am not seeing HTTP 304 response code in my Apache logs even though my webpages are sending them? I've checked this in Chrome console: My goal is to see which browsers are successfully using ...
1
vote
2answers
36 views

All pages are not being redirected to HTTPS when accessed using HTTP

I'm running a Wordpress blog that has an issue with HTTPS redirect. Except home page, no other URL is being redirected to HTTPS if you visit via HTTP. I want to redirect all HTTP traffic to HTTPS. ...
1
vote
1answer
109 views

AH00558: httpd: Could not reliably determine server's fully qualified servername error after creating VirtualHost

I have installed an Apache server in CentOS 8 and it was serving both http and https pages correctly, that is, I could view the Apache test page when connected to the server from my browser I used ...
1
vote
1answer
22 views

Flush cached selector in Adobe Experience Manager without flushing entire directory

How can I use selector based cache flushing in Adobe Experience Manager? http://example.com/content/myapp/us/en.child1.xml http://example.com/content/myapp/us/en.child2.xml Lets say,we have xml's ...
0
votes
0answers
22 views

error: AH01276: Cannot serve director… after I copied my website to new domain (host under same server)

error log: AH01276: Cannot serve directory /var/www/vhosts/example.com/httpdocs/images/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm,index.shtml)...
2
votes
1answer
59 views

Apache rewrite rule for parameter value to path while replacing slashes with underscores

Apache rewrite rule for, Query String replace / value with _ Source URL: http://example.com/my/service?opath=/content/home/page&appId=myapp rewrite to below http://example.com/my/service....
3
votes
1answer
18 views

In Apache make subdirectory require basic authentication while parent directory is open to the public

I want to make the contents of the directory /srv/www/dssx (mostly) public. The sub-directory /srv/www/dssx/basic-auth of /srv/www/dssx I want to protect with basic authentication. However, I cannot ...
1
vote
1answer
25 views

Sharing .htaccess files between directories on a server

I have a webserver with thousands of directories. Some need to be internal only, some need to reference specific IP addresses, some are public. These .htaccess files change from time to time with IP ...
3
votes
1answer
47 views

How does cPanel's addon domain work?

So, I am new to the world of cPanel. How does cPanel's addon domain feature work? Does it utilise Apache Web server's VirtualHost feature? Or does it do something else?
1
vote
1answer
16 views

.htaccess redirect to “410 Gone” status for URLs containg one letter + word “shop” after domain

After I recovered Drupal 7 site from malware attack I end up with lot of links pointing to (previously) spam content like this: https://www.example.com/lshop/puma-rihanna-c-449/?zenid=...
1
vote
0answers
17 views

mod_pagespeed & Virtualmin - mod_pagespeed only active on one virtualhost

I've installed mod_pagespeed on a server running Virtualmin. Mod_pagespeed is only active on the first virtualhost (Alphabetically). How do I enable mod_pagespeed for all virtualhosts in a Virtualmin ...
0
votes
0answers
9 views

Wamp Server Secondary Folder

I have an Apache Web Server running with Wamp 64bit on Windows 7, and I wanted to know if there is any way to add a secondary Serve folder on another Drive using the same port but as a subfolder like ...
1
vote
0answers
29 views

Website was not redirect from non www to https+www

I'm currently doing www+https redirection where I hope that my website able to redirect from http://example.com to https://www.example.com but it does not work even I have added redirection in ....
1
vote
1answer
39 views

Apache: redirecting an entire directory to the root of another site

I want to redirect everything from a certain subdirectory to the root of another site, i.e. without the subdirectories: example.com/jobs should be redirected to jobs.example.net everything path ...
0
votes
0answers
23 views

Using .htaccess to map a random path to a private directory

I am trying to implement a zero downtime deploy strategy for a static website using an .htaccess file. I'd like to access at http://example.com/__staging__ the staging enviroinment redirecting ...
2
votes
1answer
37 views

Apache .htaccess Redirect and RedirectPermanent directives do nothing

I am trying to do a very simple redirect for an entire web site using instructions from sites like this and this, and several others that say the same thing. I am using Apache. My .htaccess file ...
5
votes
1answer
159 views

Redirect all URLs exactly except one URL that must be redirected to a different URL

I must to change domain from example.net to example.com. To redirect all URLs exactly (www and non-www) I use: RewriteEngine On RewriteCond %{HTTP_HOST} (w*)example\.net$ [NC] RewriteRule ^ https:/...
0
votes
0answers
36 views

You configured HTTP(80) on the standard HTTPS(443) port! [duplicate]

I currently have a website which runs under https and works with no issue and I've tried to do something on my .htaccess file so that when I try http://example.com it will redirect to https://www....
2
votes
0answers
29 views

How to customize 3xx status pages in Apache?

How can I customize the 3xx status pages Apache? I am able to customize the 4xx and 5xx error pages using the ErrorDocument directive. I have tried the same for the 3xx status pages, but no good. I am ...
2
votes
1answer
40 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
76 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
406 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....
1
vote
1answer
36 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 ...
0
votes
0answers
12 views

apache .htacess redirect to treat root domain with or withought / as a single page not 2 page [duplicate]

I have developed a dynamic PHP website and code is written in core PHP (NO CMS or Framework used). When I am checking with SEO tools it is saying duplicate content for https://sattamatkaa.in/ and ...
2
votes
1answer
41 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 ...
0
votes
0answers
6 views

How to terminate Cpanel account from the list of Cpanel Accounts in WHM

We have some 30 Cpanel accounts in our server. I can browse the CPanel accounts by WHM >> Home >> Account Information >> List Account Some of them are in no longer use and some of them are ...
0
votes
1answer
21 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 ...
0
votes
0answers
80 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
45 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
46 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}...
0
votes
0answers
12 views

Apache Video Play Statistics

I have an Apache web server that is currently serving MP4 video files to a WordPress.com website. On the WP site - I am direct embedding the MP4 video files that are hosted on the Apache web server. ...
2
votes
2answers
1k 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
44 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 ...
1
vote
1answer
33 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 ...
4
votes
1answer
1k 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
393 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
41 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
83 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 ...
1
vote
0answers
32 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
727 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 ...
3
votes
1answer
233 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
2 3 4 5
22