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
1 vote
0 answers
28 views

Apache reverse proxy to NodeJS app on LAN

I have a LAN network with a server and client at addresses MYSERVER.IP and MYCLIENT.IP. The server has a nodeJS app running on port 3000. Navigating in the browser from the client machine to MYSERVER....
user avatar
  • 11
1 vote
1 answer
13 views

Does a vhost specific .conf settings over-ride the ssl.conf settings?

In my mods-available/ssl.conf ( It is also symlinked in mods-enabled ) I have these lines: SSLCipherSuite HIGH:!aNULL SSLProtocol all -SSLv3 For my vhost I have: <VirtualHost *:443> ...
user avatar
  • 35
1 vote
0 answers
11 views

When setting up Apache2 on ubuntu 20.04 for HTTPS do I need to use the <IfModule>?

I am setting up HTTPS on a new Apache2 install. I plan to use the free certs from CloudFlare and install their Origin Cert and Private Key. Would really appreciate your input. I have just run a2enmod ...
user avatar
  • 35
1 vote
1 answer
21 views

Apache2 set up on Ubuntu 20.04 problem: refused to connect

I think I have set it up properly but I am just getting a "refused to connect." message To start with it is just simple http. My domain is good-health.ml So I set up this in /etc/apache2/...
user avatar
  • 35
0 votes
0 answers
19 views

How to use Apache server with statically linked binaries

I have a github repository that has C++ source code which after running cmake and make commands builds statically linked binaries. These binaries are used with a webpage called index.html created in ...
user avatar
2 votes
1 answer
16 views

custom 404 page not work Apache/2.4.51 if missing is in a virtual subdirectory (Debian)

this is my first question here, I hope to find a solution. I have a problem with page 404 when the missing page is in a sub "virtual" directory, is used to pass a value to php, in ...
user avatar
1 vote
1 answer
20 views

Graceful restart of Apache may fail with avahi_entry_group_add_service_strlst saying "Not supported"

It has now happened tice that my Apache 2.4.41 (on Ubuntu 20.04) automatically performs a graceful restart around midnight, but the previously running website doesn't "come back". The ...
user avatar
14 votes
3 answers
2k views

HTTP Status Code: Response with 101 or 301?

We can force SSL in apache servers with following config: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Here, we tell the apache server ...
user avatar
  • 243
1 vote
1 answer
90 views

HTTP to HTTPS Apache redirect doesn't work when used with other redirects

I have been asked to help with an OpenCart 1.5.6.1 installation on shared hosting with some redirection requirements. Some of the redirects were already present and I'm not sure if they are required ...
user avatar
3 votes
1 answer
94 views

ServerAlias directive not working on Apache 2.4.49

I have an instance of WordPress set up at https://wordpressinstance.example. I have an instance of MediaWiki set up at https://mediawiki.wordpressinstance.example. The MediaWiki instance is ...
user avatar
2 votes
1 answer
43 views

Subdomain folder content returns 404, but root level works

I am setting up a subdomain - subdomain.example.com for my existing example.com to serve application with distinct origin Using DNS manager of my registrar, DNS Manager: type CNAME, name: subdomain, ...
user avatar
  • 23
2 votes
0 answers
72 views

When Bing requests a sitemap or a robots.txt, why do I see Apache reject the 1st request with a 403, followed immediately by a 2nd successful request?

This is a small issue that has been ongoing for quite some time. When I check my Apache server log for 403's, all entries are related to Bing, and all from when it requests a robots.txt, sitemap.txt, ...
user avatar
0 votes
0 answers
7 views

Webserver/Minecraft server on same IP address [duplicate]

Here's what's going on. I have a 2019 windows server, and on it Im running a webserver (apache2), and multiple Minecraft servers. I have a domain with multiple subdomains for each Minecraft server ...
user avatar
0 votes
0 answers
79 views

Adsense not showing

This is kind of a strange glitch, but still..? I can’t figure it out. When I go to a question on my database almost every time, the ads don’t show, but when I change the url by adding page.php?...
user avatar
2 votes
1 answer
39 views

Why does subdomain.localhost work on Ubuntu but not on Debian? (without hosts entry)

I have set up LAMP stacks on both Ubuntu 20.04 and Debian 10 running Apache 2.4. The VirtualHost Files are identical as follows : <VirtualHost localhost:80> ServerAdmin webmaster@localhost ...
user avatar
  • 23
4 votes
1 answer
418 views

Cookies for www and non-www different

I just discovered that cookies for www and non-www are different. I now understand that the browser treats example.com and www.example.com as two different domains. In detail, how can I assure that ...
user avatar
  • 141
1 vote
0 answers
22 views

httpd.conf is cached and no editing is succesful [closed]

I am going to use the WSL system on Windows10 to create a website. The distro is Ubuntu. I put httpd.conf in /etc/apache2/conf-available where there are these two lines (line 40): Define SRVROOT "...
user avatar
  • 111
2 votes
1 answer
263 views

How can I rewrite all Files to the Index Folder and also Remove the Extensions

I've been looking for a solution for a few hours now, and I'm struggling to understand why the Regex doesn't act like Regex... If you just try to match a letter, it doesn't match a letter, and I can't ...
user avatar
2 votes
1 answer
162 views

Apache doesn't redirect subfolders

I'm having trouble configuring my Apache server through the .htaccess file. I want to redirect all request from my domain (example.com, www.example.com, example.com/folder1/folder2) to my new domain (...
user avatar
0 votes
1 answer
39 views

Expose service via DynDNS, docker container, and a different port than 80

I am toying around with my Raspberry Pi. Today I set up a container running Etherpad Lite and I would like to make it accessible through the internet. Accessing it via local/internal IP address on its ...
user avatar
  • 103
1 vote
0 answers
30 views

Invalid command 'SSLEngine', with "--enable-ssl" configured Apache

I built an Apache 2.2.32 server on Ubuntu from sources, and if I test my phpinfo() I see: './configure' '--prefix=/usr/local/php_7.2.25' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysqli=/usr/...
user avatar
  • 423
1 vote
1 answer
118 views

Url changing with htaccess

I have a web presentation with some typical url adresses. Now I need to add a rewriterule for a different languages, examples: domain/club -> do not change domain/club/path -> do not change ...
user avatar
4 votes
1 answer
81 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....
user avatar
2 votes
0 answers
306 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 ...
user avatar
  • 153
2 votes
1 answer
795 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 /.* ...
user avatar
  • 143
1 vote
1 answer
69 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 ...
user avatar
1 vote
0 answers
42 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 ...
user avatar
7 votes
2 answers
928 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 ...
user avatar
2 votes
1 answer
77 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> ...
user avatar
2 votes
1 answer
68 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+...
user avatar
1 vote
1 answer
143 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 ...
user avatar
  • 111
1 vote
1 answer
22 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: <...
user avatar
1 vote
1 answer
40 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=...
user avatar
0 votes
1 answer
37 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 ...
user avatar
1 vote
0 answers
31 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 ...
user avatar
  • 111
2 votes
1 answer
33 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 - ...
user avatar
  • 21
1 vote
0 answers
13 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 ...
user avatar
2 votes
1 answer
150 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 ...
user avatar
  • 185
1 vote
1 answer
479 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....
user avatar
  • 113
1 vote
1 answer
100 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 (...
user avatar
  • 423
1 vote
1 answer
317 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/...
user avatar
  • 185
1 vote
1 answer
64 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 ...
user avatar
  • 21
1 vote
1 answer
92 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....
user avatar
1 vote
1 answer
67 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 ...
user avatar
0 votes
0 answers
83 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 # ...
user avatar
2 votes
1 answer
72 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 ...
user avatar
  • 23
3 votes
1 answer
493 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 ...
user avatar
  • 585
1 vote
2 answers
90 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&...
user avatar
1 vote
0 answers
93 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 ...
user avatar
  • 11
3 votes
1 answer
57 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 ...
user avatar

1
2 3 4 5
9