Questions tagged [virtualhost]
Questions relating to virtual hosting; that is, serving content for multiple logically-separate entities from the same machine. Usually relates to name-based virtual hosting in the web server, but can also cover other protocols such as SMTP or IMAP.
2,752
questions
0
votes
0
answers
26
views
How to serve two different websites on one Apache Webserver without using Virtual hosts? [duplicate]
We use Apache Webserver on Windows to serve one web app within our software. A browser embedded in our software accesses the site on localhost. The webserver and the web content are installed on every ...
0
votes
1
answer
35
views
Fresh Apache (re-)install ignoring default vhost
I was trying a few thing for a custom "default" Apache vhost and nothing seemed to work, I always got the /var/www/html/index.html served instead of other contents or errors I wanted to ...
1
vote
1
answer
4k
views
Using RewriteRule only for a specific subfolder/project
I have an application in a subfolder "subfolder" of Apache so I can use a URL such as: https://example.com/subfolder/#/v2/login instead of https://example.com/#/v2/login.
I have the following in the ....
0
votes
0
answers
27
views
Apache httpd ErrorDocument directive not working
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:
&...
0
votes
0
answers
80
views
How to block some bots in .htaccess but except access robots.txt?
I've blocked some bad bots using .htaccess.
For example:
SetEnvIfNoCase User-Agent "^bot1" bots
SetEnvIfNoCase User-Agent "^bot2" bots
SetEnvIfNoCase User-Agent "^bot3" ...
0
votes
2
answers
4k
views
virtual host and IP address mapping
I have a rackspace server running with nginx. I am a newbie to all the server stuff. Let me explain the situation here:
I have an IP address and I have two virtual host on my machine.
I don't have a ...
1
vote
2
answers
3k
views
Custom listen ports for Apache not working
I wanted Apache (v2.4.41) to listen to port 802 and 44302 instead of 80 and 443 on my Ubuntu (v20.04) server so I did the following:
Edited the port numbers in /etc/apache2/ports.conf. Now the file ...
0
votes
0
answers
39
views
Nginx serves wrong DocumentRoot
I have an NGINX reverse proxy with Apache running on Linux22. My goal is to serve a file in a new documentroot, but for whatever, the Nginx Default conf serves the old apache2 index file. The ...
0
votes
0
answers
33
views
My openlitespeed virtual host external app does not run as required user
I'm trying to setup OpenLiteSpeed, and I want PHP to run as a certain user and a certain group in a certain virtual host. I've turned the entire knowledge base upside down, especially this section ...
3
votes
5
answers
11k
views
503 error on apache virtual hosts
I created a virtual host with the following code on an ubuntu apache server
cd /var/www/
sudo mkdir fd-pro
sudo mkdir /var/www/fd-pro/ch-api
sudo mkdir /var/www/fd-pro/ch-api/public_html
sudo chown -...
1
vote
1
answer
18k
views
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /abcef/report
I am getting below error while trying to do some access website url.
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request ...
0
votes
0
answers
84
views
What would cause virtual hosts to use the same version of php-fpm after adding distinct fpm handlers?
As soon as I enable php8.1-fpm.conf, all my sites switch from using php7.4-fpm to php8.1-fpm. All my vhost files have fpm handlers added to the <VirtualHost *:80> blocks like
<VirtualHost *:...
0
votes
1
answer
29
views
Apache ignores second virtual host
we are using Apache on an Ubuntu server to host our websites. SSL Certificates are provided be LetsEncrypt and everything worked fine for the last years.
Last friday I tried to renew one of the ...
32
votes
10
answers
91k
views
Why might Apache ignore a virtual host with a ServerName matching the requested URL?
I'm trying to add a second virtual host to my apache configuration, but cannot seem to get the new virtual host to be used.
My httpd.conf just contains the following line:
ServerName ...
26
votes
6
answers
71k
views
How can I list the current Apache 2 virtual hosts from the command line?
I want to to retrieve a list of the virtual hosts which are currently loaded and listening for requests i.e not just grepping the config files.
It looks like apache2ctl -S does this but I am not 100% ...
0
votes
2
answers
7k
views
undefined variables in /etc/apache2/apache2.conf
Whenever I run sudo apache2 -S on my server it throws the following error:
[Sun Mar 04 16:17:22.303217 2018] [core:warn] [pid 31405] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sun ...
2
votes
1
answer
10k
views
2-way SSL with apache forward proxy
I'm working to set up Apache as a forward proxy with a client that uses 2-way SSL. The basic flow is myApplication --via http--> Apache proxy --via 2 way SSL--> client. After setting everything up, ...
18
votes
10
answers
83k
views
Nginx conflicting server name for subdomain
I currently have a vhost running on Nginx for foo.domain.com and everything works great.
I created a new file for a new sub-domain I want to add called bar.domain.com. I use the same settings for ...
0
votes
0
answers
30
views
Placement of HTTP Headers in VirtualHost Containers?
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
Header always set X-XSS-Protection "1; mode=block"
Header always set X-Content-Type-...
1
vote
2
answers
5k
views
HTTP working HTTPS not working
I set up Comodo SSL on CentOS 6.7 and Apache/2.2.15 and we are running a CakePHP application on the server. When I go to http/domain its working but when I go to httpS/domain it says 404 Not Found (...
1
vote
1
answer
4k
views
Apache SSL virtual hosts sharing same DocumentRoot
I have a web server with two domains pointing to the same document root. I have separate SSL certs for the two domains. I want (almost) everything that comes to the site(s) to run under SSL. All works,...
0
votes
0
answers
26
views
Virtual host configuration not working
I'm trying to move for the first time a website to a dedicated server running on debian.
I created a file called mywebsite.com.conf in /etc/apache2/sites-available
Here's the file :
<IfModule ...
0
votes
1
answer
213
views
Hosting Laravel Filament apache server responded with a MIME type of ""
I been trying to host my laravel filament project into my server using apache but upon deployment i met 2 problem i never seen before
pic related
Failed to load module script: Expected a JavaScript ...
0
votes
0
answers
247
views
Set up proxy for Nextjs and WordPress blog
Thanks in advance. I am new to server setup. So pardon me If I used the wrong words.
I am setting up an Ubuntu server to host Nextjs and WordPress blog on the same server.
I have to set up Nextjs on ...
106
votes
3
answers
453k
views
What is .crt and .key files and how to generate them?
I've the following configuration:
SSLEngine on
SSLCertificateFile /etc/httpd/conf/login.domain.com.crt
SSLCertificateKeyFile /etc/httpd/conf/login.domain.com.key
SSLCipherSuite ALL:-ADH:+HIGH:+MEDIUM:...
13
votes
2
answers
22k
views
Domain redirects to wrong site in nginx, multiple sites in config files
I have 2 websites setup on nginx, and the correct one should load depending on which domain is accessed.
For example:
website1.com
website2.com
However, when accessing either of these domains, they ...
0
votes
1
answer
175
views
php-fpm creats only one socket file
I have multiple virtual hosts with unique domain names, users, and root directories for each on Nginx and php8.1-fpm.
In the /etc/php/8.1/fpm/pool.d/domain.com.conf contains
user = domainuser
group = ...
0
votes
1
answer
153
views
Postfix: Different TLS certificates for each hosted virtual mail domain
I have a single machine with a single Postfix instance which hosts different virtual mail domains.
Is it possible to configure Postfix such that is uses different TLS server certificates (with ...
0
votes
1
answer
31
views
Host with online server(Linux)
I purchased a server with ubuntu server.
Is it possible to create virtualhosts and connect them to a public domain to browse them?
Thank you,
Best regards,
30
votes
5
answers
97k
views
.htaccess is ignored even though VirtualHost has "AllowOverride All"
I'm running a LAMP server on Fedora 13 that's working fine; however, I just added an ".htaccess" file to my current site's docroot folder that is being completely ignored.
I've tried half a dozen ...
1
vote
1
answer
627
views
How to point two different domains to the same web application (Apache)
I have an app: l'et's call it Mickey.
To access the app, I've configured the vhost in apache, so that when accessing the third level domain mickey.example.com, the app Mickey is served.
This works.
...
0
votes
1
answer
272
views
Apache VirtualHost Same domain for Front and API
I have a multi-tenant application that is resolved using subdomains with the pattern *.localhost. The front-end of the application is accessible at http://localhost:3000/.
To achieve the desired ...
1
vote
1
answer
84
views
Apache AliasMatch with Multiple Subdomains
I have the following virtual hosts:
<VirtualHost *:443>
ServerName article.example.com
AliasMatch "^/(.*)" "/var/www/html/article.php"
</VirtualHost>
<...
5
votes
2
answers
3k
views
Nginx Multiple Domains
I am trying to add a second virtual host to nginx. When i go to the new domain it redirects to the old one. I have tried restarting Nginx, rebooting the server.
Has anyone come across this before, ...
0
votes
0
answers
165
views
Apache2 with Virtualhosts and Cloudflare are not working
I have a Debian 11 Server with one public IPv4 Address and One Domain. The subdomain mail is defined in a virtual host with a reverse proxy for mailcow. The subdomain mail is also the reverse DNS for ...
0
votes
0
answers
47
views
Show content of loaded sites-available in apache2 under ubuntu 18
I accidentally deleted a .conf in /etc/apache2/sites-available.
Is there a way to retrieve the content of it?
When I type a2query -s, I see that the deleted .conf is still loaded, since I did not ...
2
votes
1
answer
7k
views
Apache Reverse Proxy with Subfolder Proxies
I currently have a Sub Domain Proxies and Sub Folder Proxies working as seperate virtual hosts.
I want to minimise/simplify the code by combining.
My end game is to have Subdomains pointing to ...
32
votes
6
answers
45k
views
Best way to prevent default server?
I have a number of vhosts, and I'd like to "turn off" the default vhost, either by blank page, error page, or generally whatever is the most efficient use of Nginx's resources, whilst only allowing ...
0
votes
1
answer
4k
views
ERR_SSL_PROTOCOL_ERROR apache hosting gitlab
I am hosting Gitlab on digital ocean and I have setup Gitlab to use Apache. When I create a VirtualHost for gitlab I get SSL. It works when
VirtualHost is set to <VirtualHost *:80> but then ...
0
votes
2
answers
93
views
Apache virtualhosts conf let wrong servername requests going through proxy
I have moved a server configuration to a new server and at the same time configured it with apache mod_proxy to access a gunicorn/django webserver (inside a docker container on port 8000). Previous ...
0
votes
0
answers
48
views
Apache with vhosts: Newly created site opens other site
I have a server with three vhosts, the default (domain.com), site1.com and site2.com. The server is running Ubuntu 22.04 LTS with Apache2. Until yesterday, this server only served the default domain, ...
2
votes
1
answer
1k
views
Why is my Apache Virtual Hosts configuration not working correctly?
Background
I have been using an Apache server with only one site and this has been working really well. My working single-site config is at the bottom of the question. Recently, I have had to create ...
0
votes
0
answers
1k
views
configuring content-security-policy for apache virtual hosts
I have Apache 2.4 with these sites configured in the httpd-vhosts.conf file:
<VirtualHost *:80 *:8080 *:8084>
DocumentRoot "c:\apache_php\sites\public"
ServerName www.mydomain....
0
votes
0
answers
20
views
DNS/Domain not working [duplicate]
I have domain, pointed to my VPS. I made VH in apache to serve simple index.htm file to check if everything works fine.
Unfortunatelly something is wrong because page is not found(http://zoofi.me).
...
0
votes
0
answers
14
views
How can I add the (virtual) ServerName value as customer Header in Apache2?
I would like to get the ServerName on the HTTP response of Apache in a custom header.
Something like this:
Header Set X-VirtualServerName "%{SERVERNAME}"
Please consider this string can be ...
0
votes
1
answer
1k
views
How to get access virtual servers from host machine by domain?
I have virtual machine Ubuntu on Windows host machine. On VM there is nginx server with virtual server site.com. VM IP is 127.0.1.1. In VM I edit /etc/hosts:
127.0.1.1 site.com www.site.com
And now I ...
0
votes
1
answer
953
views
How to make my website SSL secure with Ubuntu 22.04.2 LTS server and Apache
I'm trying to access my website through https://. but all my efforts are in vain.
First I will explain how I did everything to get into the context.
The server hardware is a Raspberry PI2B. With ...
0
votes
1
answer
301
views
Bring website online with domain without adding the port
I come to you because currently I have a website that is hosted on my web server. But on this server I have several websites hosted on it. So to access it you have to put a port number. Until then it'...
-1
votes
2
answers
99
views
Wildcard sub-domain apache vhost doesn't load my website folder
I'm having some issues getting my apache virtual host to load the correct folder on my server. I'm building a public status pages feature for my platform, and one feature is allowing users to specify ...
1
vote
3
answers
342
views
Apache VHOST: host vs. IP
I have the following Apache config:
ServerName mydomain.com
<VirtualHost 1.2.3.4:80> # contains my IP
NameVirtualHost 1.2.3.4 # contains my IP
ServerName mydomain.com
</...