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
0 answers
17 views

Apache httpd ErrorDocument directive not working [migrated]

I'm on a RHEL 8 machine and use Apache httpd to display severel vHosts. I want to redirect all requests to a maintenance page when error code 503 is returned. My vHost configuration looks like this: &...
user23705068's user avatar
0 votes
1 answer
13 views

How may I do a redirect where the page it {redirected to} shows the URL it {redirected from} to the user? [closed]

I'm doing some special error pages but because of things, they're one hop away though, meaning all that's left in the address bar is a cleaned up address with a 3-character-long path. I want to, ...
Vita's user avatar
  • 73
0 votes
0 answers
17 views

How to proxypass every contexts from public domain to a virtual host domain with Apache?

I have one server and two domains, a public domain 'apple.com' for service, and a private domain 'grape.com' for internal network. I tried to ProxyPass every contexts after apple.com to grape.com. For ...
Lunartist's user avatar
  • 163
1 vote
1 answer
113 views

Use their own SSL certificate for domains when DNS routing is applied

On my VPS server with cPanel/WHM, I have 2 accounts: domain1 and domain2. Each of these domains are the main domains for their accounts. Meaning that domain1 has other alias domains as well, and ...
Catalin Farcas's user avatar
2 votes
2 answers
158 views

How to remove the wildcard subdomain on Apache to prevent Google from indexing Subdomains that do not exist

I am experiencing the issue explained at https://stackoverflow.com/questions/53065450/subdomains-that-dont-exist-are-indexed-by-google-zombie-subdomain-removal-via. Notice how the the search engine ...
Jaime Montoya's user avatar
0 votes
0 answers
230 views

How to block unwanted bot in Apache 2.4?

These rules work good in my .htaccess: #https://workinnet.ru/de/wie-man-amazonbot-blockiert/#German language# SetEnvIfNoCase User-Agent "Amazonbot" blocked_bot <Limit GET POST HEAD> ...
josefus's user avatar
2 votes
1 answer
80 views

Identifying virtual hosts on server

Is there some mechanism for remotely determining what virtual hosts are configured on a server? For example, I have a domain, say example.com, and I'm running an Apache server. Let me then create a ...
Teakwood J Overclutch's user avatar
0 votes
0 answers
27 views

Connection refused when accessing my website with a url and a port number but its fine if accessing it with IP

I have a cpanel apache website. When i try to access it with url and a port number like mysite.com:3000 it returns connection refused but if I access it with ip like 147.100.xx.xxx:3000 it's working ...
Eddi's user avatar
  • 101
1 vote
0 answers
36 views

Snipe-IT / Cpanel / WHM auto SSL issue

Maybe some of you have done it and could help me. I use Cpanel and WHM. Basically I installed snipe-it and had to create a custom VirtualHost in WHM via include file. The site is a subdomain.(( # To ...
Arthur's user avatar
  • 11
0 votes
0 answers
177 views

How can I test the PHP module in .htaccess

I have installed XAMPP on my Mac for testing and teaching purposes. One thing I need to do is set up some settings, but I can’t guarantee whether PHP will be running as a module, so I can’t guarantee ...
Manngo's user avatar
  • 293
1 vote
1 answer
73 views

Prevent access to parent URL but not its children

On a Debian VPS I run an Apache 2.4.56 web server and I want to prevent any access to a parent URL, for instance https://example.com/participants while allowing access to any of its children, for ...
Dave White's user avatar
0 votes
1 answer
41 views

In an apache reverse proxy config, for the max attempts, do balancers count as workers?

Within the ProxyPass directive is a table titled Balancer parameters and it has a row called maxattempts. The default is as follows: One less than the number of workers, or 1 with a single worker. ...
Thomas Stokes's user avatar
0 votes
1 answer
53 views

Apache URL rewrite does not mask subdirectories

The admin setup a subdirectory /sites/default/files/resources and updated the docroot .htaccess to point to this subdirectory so that the domain www.example.com points to it. I do not have access to ...
TPI's user avatar
  • 1
1 vote
0 answers
51 views

Apache Server Side Includes Won't Expand Variables in Regular Expressions

I am trying to use an SSI variable in an SSI regular expression like the 3rd line ( I will paste the full test code further down) <!--#set var="referrer" value="https://edcint.co.nz/...
user3421823's user avatar
1 vote
0 answers
23 views

Apache Server Side Includes Won't Parse CGI Output [closed]

I am trying to parse the output of a CGI script for SSI code. The simple CGI code is as follows and simply prints one line of SSI code #!/usr/bin/perlml -w use strict; use CGI qw( :standard ); my $q=...
user3421823's user avatar
6 votes
3 answers
2k views

Functional difference between proxypass and proxypassreverse in Apache

The official document states that: The ProxyPass configures the server to fetch the appropriate documents, while the ProxyPassReverse directive rewrites redirects originating at internal.example.com ...
Lunartist's user avatar
  • 163
1 vote
1 answer
52 views

Apache2 Only Showing Default Page/Unlimited Redirects

I am using a reverse proxy to show my bitwarden site. Here is the .conf in my sites enabled: <VirtualHost *:80> ServerName bitwarden.example.com Redirect "/" "...
Jason Chan's user avatar
0 votes
1 answer
145 views

Help with HTACCESS 301 Redirect to different site with URL parameters

I have two websites, elijahstreams.com (OLDSITE) and projectjustcause.com (NEWSITE). I need ID-based URLS to forward from OLDSITE to SEO-friendly URLS on NEWSITE via .htaccess directives. This is what ...
Eric Hepperle - CodeSlayer2010's user avatar
1 vote
2 answers
91 views

HTTPS site on Chrome with paid SSL showing as Dangerous

I built a WordPress STAGING site on projectjustcause.com domain. I have installed and tested paid SSL cert and it worked fine. When I added directives to APACHE 2.4 .htaccess file to forward all http ...
Eric Hepperle - CodeSlayer2010's user avatar
2 votes
1 answer
212 views

Bing site scan: Avoid Error 403 if index.html is missing the root domain name

I have a website with the following domain name: https://example.com (there is no index.html in the root domain name) I have the following redirect based on language detection in .htaccess: https://...
Goemon Code's user avatar
0 votes
0 answers
126 views

Redirecting old domain to two new domains

The issue at hand is redirecting selected pages from the olddomain to the newdomain1 and newdomain2. Doing one domain is fairly straightforward, but it's different when handling two domains. Any ...
nickhiebertdev's user avatar
0 votes
0 answers
11 views

How to solve problem of the appearance website IP in Google search results [duplicate]

I published my website on the Internet a year ago, and it has been working normally since then and Google indexed it, but I had an error in my server and Some SSL certificate files were deleted by ...
Tarek Hussien's user avatar
1 vote
1 answer
292 views

htaccess redirect with negated conditions

Simple redirect in .htaccess works: #Redirect 302 / https://domain.toberedirected.com But the conditional one doesn't. I want that if the remote user IP address is in the list then ignore the ...
user109077's user avatar
0 votes
1 answer
37 views

301 Redirect a domain to new domain and add extra subdirectory to the existing path

i want to redirect my old domain to new domain x.com - y.com and also, my old domain x.com currently doesn't have sub directory in url ex: x.com/news-today for my new domain y.com having sub ...
Surya Tej's user avatar
0 votes
0 answers
13 views

My Apache is logging even an IPV6 Address as an IPV4 address. How to fix this? [duplicate]

My phone has an IPV6 address. When I hit my apache server, I see an IPV4 address being logged there. I did that with multiple IPV6 address devices and same thing happened. Kindly help what I can do.
Ruthvik Majety's user avatar
1 vote
0 answers
143 views

Installing PHP extensions in Plesk Obsidian - idiots guide required

I'm trying to upload files from my server to an another server via SFTP. I'm running Plesk Obsidian 18.0.31 Update #3 - ‪CentOS 6.10 (Final)‬ From what I understand I need to install some extensions ...
Pat Dobson's user avatar
2 votes
1 answer
64 views

Pagespeed Virtual Host Configuration

I installed pagespeed on CentOS 7 with plesk (apache 2.4). I have 2 vhosts with different SSL certificates on the server. Pagespeed is running server-wide. Filters such as collapse_whitespace and ...
KenAdamsTR's user avatar
1 vote
0 answers
22 views

Block specific C range of IP addresses [duplicate]

I can't find a good reference though my understanding is that ranges in an IPv4 address are: a.b.c.d I wish to block only the C ranges starting with 51.15.51.0 and ending with 51.15.142.255. I have ...
John's user avatar
  • 153
2 votes
1 answer
94 views

I got a Google indexing warning because I am using HTTP forwarding

Today I received a mail from Google. There is a problem with indexing my website because I am using HTTP forwarding. I disabled HTTP a week ago now only allowing HTTPS. I am using this code in my ...
zomega's user avatar
  • 131
1 vote
0 answers
90 views

I need some help modifying a url going through an apache Reverse Proxy [closed]

I inherited this system from my retired coworker who inherited it from the person who set it up, so my knowledge of reverse proxies is pretty bad. Here is the situation... We are upgrading a system ...
Brian's user avatar
  • 11
2 votes
1 answer
84 views

Redirect 301 a URL already created by a rewrite rule in .htaccess

I'm creating SEO friendly URLs with rewrites in .htaccess. Now I need to redirect (301) a couple of these rewrites, and have no idea how to do that. These lines: Options +FollowSymLinks RewriteEngine ...
Aknot's user avatar
  • 123
1 vote
0 answers
14 views

Is RewriteMod for WordPress site: site.ro -> site.com/?lang=ro possible?

I'm not much of a WordPress specialist - is it possible to redirect new domain to the same site, but with ?lang=ro query parameter so it shows the old site with selected language? Result I want: site....
jean d'arme's user avatar
1 vote
0 answers
320 views

Plesk Obsidian (18.0.48) - 413 Request Entity Too Large (nginx)

Hello recently I set up a server using Ubuntu 22.04.1 LTS and Plesk Obsidian 18.0.48. However I encountered a problem when uploading files around 1GB of size. The website I am running is a docker-...
Anbosuki's user avatar
0 votes
0 answers
206 views

How can I disable users from accessing Apache server with an IP address in the URL instead of my domains?

I have a self-hosted and self-managed web server using Apache 2.4 on Debian. I use many domains on this server and have configured them using vhosts. I want my users to use the domains I configured to ...
vl-20100's user avatar
1 vote
1 answer
79 views

Pointing domain to my IP an port [duplicate]

I have a server with ip 55.335.32.56:4000 but want to use my domain user.example.com I am trying to do this with apache via httpd:vhost.conf Listen 4000 <VirtualHost 55.335.32.56:4000> ...
Daniel_HD's user avatar
1 vote
1 answer
835 views

Apache2 Reverse Proxy only showing default page

I'm completely new to Apache. I have a Django backend that serves as an API and a SvelteKit frontend. Django runs on 0.0.0.0:8000 and SvelteKit on 0.0.0.0:3000. I'm trying to setup Apache so it uses ...
kekspekmek's user avatar
2 votes
0 answers
98 views

While setting up http to https redirect on Apache (with Drupal and certbot) it broke http access and fails to redirect

I am trying to set up a Drupal site on a VPS. It was working. I used certbot to set up https, which worked when going to https://example.com . Going to example.com was in http. I vaguely followed ...
schumi23's user avatar
0 votes
0 answers
108 views

htaccess: differentiate between directory and directory with query parameters

I have a little PHP framework like this: ?page=page-name ?page=page-name%slug=slug-name (in the case of plural list pages) I'm trying to pretty her up. /exercises → ?page=exercises /exercises/...
sheriffderek's user avatar
1 vote
1 answer
350 views

HTTP website redirect all except 1 file to https

I have a website where I'm wanting 1 file (version.txt) to be accessible via regular HTTP, but I want everything else to redirect to https. To do this, I added the "RedirectMatch" line below ...
Dtor's user avatar
  • 113
1 vote
2 answers
139 views

First website and losing hope with .htaccess and regex. I want to manipulate multiple things

Last time I used regex was to manipulate some BGP routes and it didn't go well. I don't expect anyone to write me a full .htaccess file, but: in which order would you write the lines? Should there be ...
ErikB's user avatar
  • 23
4 votes
1 answer
275 views

Multiple Websites - PHP Session Isolation

I have a LAMP stack on a VPS where I set up multiple virtual hosts for different (sub)domains: example.com www.example.com dev.example.com Now, I would like to make sure that PHP session data is ...
Tando's user avatar
  • 41
2 votes
1 answer
866 views

Apache Logs: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/69.0.3497.81 Safari/537.36

Amid increasing complaints of excessive resource usage from a shared webhost, a detailed check on the Raw Access Log files reveals repeat instances of the following from various IP addresses: 18.232....
Aquaholic's user avatar
  • 163
1 vote
1 answer
93 views

Need help reviewing an Apache error log on a home webserver

I'm relatively new to web development, and I've set up a self-hosted (LAMP) WP site. After one too many configuration changes I broke the site. Apache error logs are clear as to where and when things ...
ADH's user avatar
  • 11
3 votes
0 answers
69 views

"This page isn't redirecting properly" on one particular site with one particular user

I administer a web site (https://fury.games) and one of our users is reporting that they cannot load the main page and get the following error: I cannot reproduce the error, no other users have ...
Andrew Tomazos's user avatar
0 votes
0 answers
15 views

How to convert an old mod-python page to something more current? And to what -- WSGI?

A long time ago -- it seems like a lifetime ago -- I wrote a page using Apache, mod-python and python 2. It's still there (http://hex.kosmanor.com/hex-bin/board). But after a long hiatus, I have ...
4dummies's user avatar
  • 101
2 votes
1 answer
496 views

How to rewrite a request to different files based on the domain name in ".htaccess"?

I run the website https://www.1.example. The contents of my .htaccess file are as follows: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ \...
Bartosz's user avatar
  • 21
4 votes
1 answer
802 views

Modify rewrite rule to match ONLY directories, NOT directories AND files

I have the following rule in my .htaccess file: RewriteRule ^[^/].*/(dir1|dir2|dir3)(.+) $1$2 [QSA] It works great for the directories except sometimes it conflicts with files. How can I modify this ...
John's user avatar
  • 153
1 vote
0 answers
62 views

How to disable direct media file access in Nginx or Ubuntu for non-logged-in users?

I am trying to disable direct URL access (for images, PDF) to my WordPress websites for non-logged-in users, I have created one '.htaccess file' under - wp-content/uploads/.htaccess RewriteCond %{...
Ricky's user avatar
  • 11
2 votes
1 answer
54 views

Odd slash added at start of file folder in Apache rewrite

I'm working with an Apache rewrite statement that reads: RewriteRule ^((?!%{HTTP_HOST}).*)$ ${US_ROOTF_WWW}/www.%{HTTP_HOST}%{REQUEST_URI} [L,E=PROJECT_PREPENDED:1] The value of {US_ROOTF_WWW} is C:/...
missenc's user avatar
  • 21
6 votes
1 answer
411 views

Htaccess Hotlinking Prevention: Exclude a specific image from rule

I have a working hotlinking prevention in the .htaccess. Everything works fine. However, I use an image of my website in email signature. After the hotlinking prevention, this image is now displayed ...
dajana.s's user avatar
  • 161

1
2 3 4 5
24