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
24 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
40 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
32 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
9 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. ...
1
vote
2answers
159 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
39 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
31 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
382 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
43 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
40 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
43 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
21 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
128 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
27 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
274 views

htaccess redirect based on referrer URL string

I have a 3rd party who POST's to a specific page on my website. They post a file and my site does some wizardry with the contents of that file. The request URL would be for example https://example....
1
vote
1answer
40 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 /...
0
votes
0answers
12 views

CPanel - replace all references in user account of domainA with domainB

Trying to solve an easy case for when a user's domain name expired (and got stolen by squatter wanting a ransom!), for a global replacement of any text in that user's cpanel folder of the old expired ...
2
votes
2answers
38 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
73 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 ...
1
vote
0answers
29 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 ...
1
vote
0answers
17 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, ...
2
votes
2answers
46 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 ...
1
vote
1answer
37 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....
0
votes
0answers
10 views

Apache: using mod_ext_filter to output html from custom program

I'm a little stumped. I have a DOS executable that I want to eventually run in my linux apache server. Research has led me to believe using the mod_ext_filter module is my best bet. I decided to ...
0
votes
0answers
16 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
vote
0answers
20 views

Apache: using %{DOCUMENT_ROOT} inside <Directory> section

My virtualhost configuration file sites-available/site.conf contains (some lines omitted): <VirtualHost *:443> <Directory /var/www/html/my_website> # set options </Directory>...
0
votes
0answers
253 views

How to fix .htaccess error? Keeps asking for authentication

I'm setting up basic http authentication for my subdomain dev Laravel site with .htaccess and .htpasswd. First, I created my .htpasswd user and password by command htpasswd -bc .htpasswd admin ...
1
vote
0answers
26 views

Evil twin httpd caused by failed Roundcube installation [closed]

Note: I originally asked this on Server Fault and was told it was against the rules for mentioning Webuzo, so please do not ask me to take it there. System: VPS running CentOS 7 and Webuzo. httpd and ...
3
votes
1answer
76 views

HTTPD Redirect Doesn't Work with Environment Variables

We want to redirect users from an old domain to a new domain defined in an environment variable: SetEnvIfExpr true SERVER_HOST_NAME=mynewdomain.example The follwoing works in Apache 2.4 to redirect ...
1
vote
1answer
254 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 ...
0
votes
1answer
63 views

update virtual host's SSL cert after cpanel has expired

I had setup the server, virtual hosts via cpanel. I didnt renew my cpanel subscription because I no longer needed it. Now my SSL certificate has expired. I have SSH access to the server. How do I ...
0
votes
0answers
30 views

Is it normal for apache to overwrite your configuration files on update?

I updated apache (httpd) through yum on centos. Unexpectedly apache failed to start after the update. After investigating I noticed that it regenerated a whole slew of conf files in conf, conf.d and ...
1
vote
1answer
179 views

NodeJS app is deployed to port 8080

This might be a very simple question but I don't know what to search to solve my problem. Please feel free to direct me to the right resource, that would also be very helpful. This is my first time ...
0
votes
0answers
4 views

Why Does Apache's ServerLimit Assign Extra Shared Memory, and How Much Does it Assign?

It's clear from looking at documentation that Apache's ServerLimit will cause extra shared memory to be assigned. If ServerLimit is set to a value much higher than necessary, extra, unused shared ...
0
votes
0answers
11 views

Can multiple vhost use the same php-fpm pool

I have several vhost setup on my apache server. I'm wondering if there are any issues with them all using the default php-fpm www pool, if I have it set to ondemand? Some are development sites, some ...
1
vote
1answer
19 views

Debian Server Upload-Limit via PHP and SFTP

do you know where upload limits can be set on a debian server running apache2 and php7 outside of php? Problem: Can't upload files bigger than ~2MB Tried solutions: configuring php.ini (both ...
1
vote
1answer
110 views

How to redirect all requests to HTTPS with SEO friendly URL using Apache?

First of all, I would like to leave remove www and redirect all request to HTTPS like this: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$...
0
votes
1answer
40 views

Rewrite rule messes up direct links to directories

I have a very simple rewrite rule which does the job: allows link domain.com/index.php?page=NAME to be displayed as domain.com/NAME. The problem is when I try to give direct link to the image www....
1
vote
2answers
88 views

Issues with redirect rules to redirect all URLs except one page

I need to add following Apache redirect rules to .htaccess: http://www.example.com to be redirected to http://www.onemoreexample.com but http://www.example.com/support should not be redirected. To ...
1
vote
1answer
144 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 ...
1
vote
0answers
33 views

Subdomain for a different server

I have two servers running on different machines(say A and B), there is a middleware which i cannot access, which routes the traffic for website say xyz.com to machine A ip, now I want to route the ...
1
vote
1answer
200 views

Could someone explain what these .htaccess rules and “.well-known” conditions are for?

I am confused about both the purpose of .well-known exceptions and so many conditions. Is this just something temporarily put in place by the host or is it best practice to keep it in place? Why are ...
1
vote
2answers
68 views

htaccess url rewriting 2 get values

I am using PHP 7.2 URL Rewrite Rules. i am making 2 links first link is "category.php?inventory_id=" and second links "show-subcategories.php?cat_id" but the result is always the first link is working ...
1
vote
0answers
20 views

Nginx / Apache Gateway Timeout

I am running a VPS Server under Apache with Nginx as reverse proxy, the main reason for the server is to host my Magento store. One module in Magento runs a command that imports data content, this ...
1
vote
1answer
49 views

.htaccess rule to redirect entire site except for a couple pages is not working

I've been pulling my hair out for a couple of days over an .htaccess issue. I have a list of redirects which are all being done in this format: Redirect 301 /my-page/ https://www.example.com/my-page/ ...
1
vote
1answer
39 views

Website not working when adding .htaccess

I have my website hosted on a CentOS server. When I add the .htaccess file it stops working showing "Internal Server Error". On a side note: when I remove the .htaccess file the website works only ...
2
votes
1answer
143 views

Redirecting using rewrite rules from international top level domains to a language subdirectory doesn't change the domain name

I want to change from TLDs to TLD and language code. Right now we have 4 TLDs for our webpage: example.de example.com example.nl example.fr Now I want to change our settings of our CMS (Contao) to ...
1
vote
1answer
73 views

Apache ErrorDocument returns 404 in place of 302

I have a Directory and DirectoryMatch declaration with ErrorDocument as <Directory "/Images/folder"> Options FollowSymLinks AllowOverride None Order allow,deny ...
3
votes
1answer
435 views

403 ErrorDocument not working after changing to apache 2.4

I looked through a number of similar posts, but couldn't find the answer there: I am moving a website from a server running apache 2.2 to another server running apache 2.4 (CentOS 6 to CentOS 7). ...
1
vote
0answers
50 views

Password protect a website only if it is the dev site [closed]

I am trying to password protect a website only if it is the dev site using .htaccess and .htpasswd I am using Apache 2.4.29 on Ubuntu 18.04 Here is what I have in the .htaccess file <If "%{...