Questions tagged [apache2]

Apache (HTTP Server) /əˈpætʃiː/ is a modular cross-platform web server software with a large variety of features(called modules) including SSL, compression, log, proxy and server-side programming language interfaces like Perl, Python, Tcl, and PHP.

Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

htaccess: Directory Listing and Basic Auth? [closed]

I would like to combine Directory Listing and Basic Auth for a single directory, only having access to the .htaccess file (not any server-wide apache configurations). So far, my `.htaccess can have ...
4
votes
1answer
60 views

htaccess force https not working if there is not an URI

I've never worked with Apache, so I'm a completely newbie. I have a multihosting account on a provider website, where 3 domain are used. I want to force https connection on a domain, let's say example....
0
votes
1answer
14 views

Wamp VirtualHost not available to local network machine or Pointed to Domain

I installed the Wamp server stack on a loan machine (until new one arrives) to keep my site going. I configured the VirtualHost to point to port 7075. I included the directive to Allow All but it ...
2
votes
0answers
47 views

Running PHP echo $_SERVER ['DOCUMENT_ROOT']; Shows Apache Default Path

Trying to get set up and running on a new hosting company after the old one announced they are discontinuing their service at the end of the year, I am having difficulty getting the sites to run. I ...
0
votes
0answers
9 views

SSLEngine and ProxyPass in one VH

I've got a virtual host configured with my Apache/2.4.23 (Linux/SUSE) webserver. I've got ProxyPasses that are directing to a Tomcat Webserver running on that same machine. My certs are correct and ...
2
votes
1answer
98 views

Why does RewriteRule for “^//(.*)” (begins with double slash) not redirect to a single slash?

Have this rewrite rule in vHost context. But it does not rewrite requests that begin with //.* (double slash). Just serves them up from /.* (single slash) instead of responding with a redirect to /.* ...
1
vote
1answer
45 views

WordPress redirecting to itself

I have the following error in my apache2 error log (Ubuntu 18.04, local LAMP dev environment, PHP7.3), that I believe is causing a The page isn’t redirecting properly error: Apache Error Log [Thu Aug ...
1
vote
0answers
35 views

Apache2 virtual host website redirecting users to router configuration page [closed]

I am running apache2 on Linux Mint Debian Edition 4.0. I am an apache newbie. I have setup a virtual host to point to my url. I am using dynu.com for virtual DNS redirection using the ddclient ...
6
votes
1answer
225 views

HTTP2 is enabled and working, but PHP $_SERVER['SERVER_PROTOCOL'] still says “HTTP/1.1”

I've been migrating to a new host (AWS Lightsail with a Ubuntu instance) and while everything is working just fine I'm running into a quirk that I can't quite figure out. I've enabled HTTP2 on my ...
2
votes
1answer
41 views

Apache mod_rewrite in .htaccess

This should be a simple question. Checked Google but it listed nothing helpful. I use WP on one of my sites and it already generates a mod_rewrite section with: <IfModule mod_rewrite.c> ...
2
votes
1answer
57 views

Converting nearly 200 redirects into redirectmatches

I have close to 200 redirects that I would I to bring down to maybe a few dozen. Most look like the following. Redirect permanent /Fandom/Fictional_artifacts.pl /Fandom/index.pl?page=Fictional+...
1
vote
1answer
24 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 ...
1
vote
1answer
15 views

Apache2 hosted site gives 400 Bad Request when browsing to http://www.example.org, but works perfectly on http://example.org

So i've got a website hosted at example.com and I want it to work with www.example.com. I've got a CNAME entry in my DNS for www pointing to example.com. My virtual host config looks like this: <...
1
vote
1answer
18 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=...
0
votes
1answer
34 views

Visit a homepage: processing but no response

Updated: I used Chrome inspect and got this, What I did on my EC2 is to extend AWS EBS volumes from 10G to 13G, and rebooted my machine. Is it relevant to my issue? My disk usage: $ df -h ...
1
vote
0answers
24 views

How to direct Apache2 HTTPS sub-directory request to HTTP app server on another port?

for complete Apache newbie, I have NextCloud and Monitorix running on my local server https://192.168.1.2/nextcloud http://192.168.1.2:8080/monitorix and I would like to cover it via SSL, something ...
2
votes
1answer
27 views

Subdomain doesn't redirect correctly when using HTTPS

When using a sub domain it redirects to my default page/domain. This only happens when using HTTPS.. for example https://forums.example.net - takes me to example.net ...BUT http://bans.example.net - ...
1
vote
0answers
10 views

Challenges setting up httpd-vhosts.conf Apachev2.4

I will start this by saying that I am educated as a mechanical engineer, working as a Control Systems Engineer (electrical engineering) and I've been tasked with setting up a Web Server for a company ...
2
votes
1answer
50 views

Apache2, redirect too many times, but I don't know why? How can I analyze and solve?

when I try my website on localhost, browser shows me redirected you too many times. I tried everything, but no success. Tested on another server too, same situation. How can I determine the problem ...
1
vote
1answer
46 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
28 views

Thousands of “Apache/2.4.41 (Unix) OpenSSL/1.0.2r (internal dummy connection)” in my logs

I'm checking the logs of my Apache server, and I've found thousands of records per day like the following one: ::1 - - [23/Feb/2020:21:56:23 -0500] "OPTIONS * HTTP/1.0" 200 110 "-" "Apache/2.4.41 (...
0
votes
0answers
4 views

Doubts about Apache configuration example for pre-compressed content

While reading the Serving pre-compressed content section of the mod_deflate documentation, I am getting some doubts about the completeness of the configuration suggested there. As written, the ...
1
vote
1answer
66 views

Apache, Redirect is not working for substring

Issue In apache, how can I redirect to homepage in case if you will go to exact string, but everything behind this string should be displayed normally, no redirect. Example. http://example.com/...
1
vote
1answer
20 views

Apache Server - Wrong X.509 Certificate only on some virtual hosts

I have two virtual hosts using the same certificate... yet apache returns the localhost certificate for only one of them. openssl s_client -connect 127.0.0.1:443 -servername domainA.com -tls1_1 shows ...
1
vote
1answer
40 views

Prevent apache from using machine host name

In our office, we have a public facing server whose machine hostname is server16. We want Apache to only respond to requests on server.example.com. We have a VirtualHost entry with ServerName server....
1
vote
1answer
35 views

Where To Configure SSL On Nginx Reverse Proxy or on Apache2 on Ubuntu 18.04 Server?

My question is about SSL/TLS. I'm running Ubuntu 18.04 server with: Apache2 serving 3 public domains on 1 public IP. On the same server I'm running: Nginx and will configure as a reverse ...
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
49 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 ...
3
votes
1answer
213 views

Configuring .htaccess to block every request what not image in specified folder and subfolders

I have upload folder where registered user can upload files. How to block all http requests except .png .jpg .gif to upload folder and all sub-folders? Other than upload should not be affected. It ...
1
vote
2answers
58 views

What is “ineedthispage”? Where is it coming from? It is killing the server

I am seeing the following in my "access_log": ip.address.output.here - - [12/Dec/2019:15:17:07 +0000] "GET /pathto/article/15104133/?ineedthispage=yes&ineedthispage=yes&ineedthispage=yes&...
1
vote
0answers
54 views

Cloudflare + Forced SSL + auth on directory

I hope I'm asking in the right area. Here's what I have. Apache 2.4.18 on Ubuntu 16.04 server. I have my main website in a vhost, call it domain.com. This is proxied through CloudFlare. I also ...
3
votes
1answer
38 views

WP Apache .htaccess redirect .com traffic to .co.uk Issue

I have a website I am looking to redirect .com traffic to .co.uk. For the moment, when I navigate to https://example.com, it redirects to https://www.example.co.uk and displays as such in the address ...
2
votes
2answers
48 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
2answers
90 views

How to get document root set to user's public_html under LAMP cPanel?

I just opened a new VPS hosting account, with a hosting company I haven't used before, and I can't get the server to pick up the public_html directory in my user account's home directory. The server ...
1
vote
2answers
109 views

Apache redirect HTTP to HTTPS without preventing HTTP

Background I've added an SSL cert using Lets Encrypt/Certbot on my Debian 9 (Stretch) host. To modify my Apache configuration, essentially certbot copies the vhost.conf file, wraps it with and ...
1
vote
0answers
175 views

How to turn off Apache proxy HTML correction

I'm using Apache proxy to access a web application on a VM. The proxy configuration works great, no issues. However, a side effect I see is that the Apache proxy "fixes" HTML that is being proxied. ...
1
vote
1answer
395 views

Multiple pages under single directory redirection to a single Page

I have the following scenarios for web page redirects 1) All pages under www.oldexamplesite.com/page/product/New-Design/* and All pages under www.oldexamplesite.com/page/product/nature-of-design-...
1
vote
2answers
213 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 ...
0
votes
0answers
15 views

cgi problem command line ok but 403 on website

I am running on Debian 9 strech, hello.cgi on command line perl -cTw hello.cgi all is fine When i try to navigate to the subdirectory I get an error 403. I add some lines to apache2.conf to ...
0
votes
1answer
106 views

How to remove subdirectory and index.php from URL with htaccess?

I've got an apache website stored on the server at /var/www/website/ and it's the only one on that server. I'd like to adjust the URL accordingly. How can I make an .htaccess rule that would do this? ...
1
vote
1answer
557 views

Some users are redirected to cpanel cgi-sys/defaultwebpage.cgi while other don't

I have a website which used to be hosted on a managed Bluehost plan that includes a cPanel by default. for some non-technical reasons, I've decided to move the website from Bluehost to an unmanaged ...
0
votes
1answer
183 views

SSL on staging server

I have three servers: development, staging and production. I use dev as a messy environment on which I write my code. Production is my clean, sparkly, shiny tidy web server. When pushing a new version ...
1
vote
2answers
63 views

Block any other domains from using my server

Someone has set their domain to use my server. It's not a mirror, the database and everything works and updates with mine. He's basically stealing my content, and he's showing up on google instead of ...
0
votes
1answer
32 views

Trying to understand the difference between two Apache SSL config statements

I'm using Apache 2.2.34, OpenSSL 1.0.2l. Yep, I know its sun-setted and not supported, but plans to upgrade it are not immediate. I'm trying to understand the difference between these two statements....
1
vote
1answer
95 views

Apache2 sending virtual host with matching servername to a different virtual host

I have 2 separate domains that I want to host 2 different servers on. I have both conf files set up, but the problem is; going to my second domain in my browser sends me to the first virtual host and ...
1
vote
0answers
38 views

Non subdomain is “not private” but subdomain is

I am trying to setup a website for my app domain using an Ubuntu/Apache server hosted on Linode and Cloudflare. The setup works for www.my.app but not for just my.app without the www. My ...
2
votes
1answer
22 views

Don't allow access to example.com/image/pic.jpg using htaccess

I have two domains for the same website. example.com and example2.com . I don't want the /image/pic.jpg to be accessible for the example.com It means, if someone try to visit example.com/image/pic....
2
votes
1answer
45 views

HTTP/2.0 loads resources in parallel, will that change dependency order of CSS and JS in my HTML source code?

I'm willing to use HTTP/2.0 on my apache server. I'm using apache over HTTP/1.1 and I have structured my site like this : <head> sharedJS.js 1.js 2.js sharedCSS.css 1.css 2.css </head> ...
1
vote
0answers
53 views

HSTS and redirecting to www. sub domain

I am trying to setup HSTS for my website but running into some problems regarding the response headers and the use of a sub domain. What I would like is for all HTTP traffic to redirect to https://www....
-1
votes
1answer
43 views

How to hide file extensions in the URL without removing them from HTML? (Apache2)

I'm quite new to hosting a website, so bear with me. I get that I can remove file extensions with the rewrite module. However, the ones that I've found requires me to also remove the extension in my ...

1
2 3 4 5
8