Questions tagged [vhosts]

A virtual host of a HTTP/HTTPS webserver (virtual host in Apache, server block in nginx, ...)

A virtual host of a HTTP/HTTPS webserver (virtual host in Apache, server block in nginx, ...). Use this tag if your question refers to configuration and/or bugs in relation to the virtual host you configured for your application.

The term Virtual Host refers to the practice of running more than one web site (such as company1.example.com and company2.example.com) on a single machine. Virtual hosts can be "IP-based", meaning that you have a different IP address for every web site, or "name-based", meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.

Apache was one of the first servers to support IP-based virtual hosts right out of the box. Versions 1.1 and later of Apache support both IP-based and name-based virtual hosts (vhosts). The latter variant of virtual hosts is sometimes also called host-based or non-IP virtual hosts.

https://httpd.apache.org/docs/2.4/vhosts/

1009 questions
2
votes
2 answers

Nginx if statement on ssl certificates

I was wondering if it is possible to do an if statement on nginx ssl certificates (Or any other part of the configuration) if ( -f /etc/letsencrypt/live/{domain}/cert.pem ) { ssl_certificate /etc/letsencrypt/live/{domain}/cert.pem; …
Odyssee
  • 2,393
  • 2
  • 19
  • 38
2
votes
1 answer

node express vhosts VS multiple node applications on NGINX server

Is is possible to have an answer "to have and idea" with this info? : In terms of performance ( basically speed ) QUESTION 1 1: what would be best to set on a nginx server : Considering domains: http://example1.com https://example2.com…
MikZuit
  • 684
  • 5
  • 17
2
votes
2 answers

vhosts not working on windows 7 using wamp

i'm having trouble setting up vhosts on windows 7. i'm running wamp. my host file includes: 127.0.0.1 local.tribune.com i've included httpd-vhosts.conf from within my httpd.conf. my httpd-vhosts.conf includes: DocumentRoot…
user530860
  • 33
  • 5
2
votes
2 answers

Apache2: Enabled vhost directory is not loading, getting default page instead

My php apache2 site is configured and ready but somehow I keep getting the default page. sworup@sandwitchslayer:/etc/apache2/sites-enabled$ ls -l total 0 lrwxrwxrwx 1 root root 34 Sep 17 00:38 sworup.com.conf ->…
Sworup Shakya
  • 1,328
  • 3
  • 16
  • 44
2
votes
3 answers

Laravel 5.2 Pretty URLs

How can i change http://domain.com/public/index.php to http://domain.com and can get the other routes working other than ('/') ? Workaround 1: vhost file: DocumentRoot "/var/www/html/domain/public" ServerName…
saimcan
  • 1,706
  • 7
  • 32
  • 64
2
votes
1 answer

puphpet - multiple vhost causes php not working

When I vagrant up with 1 vhost, the php working good. But when I added 2nd vhost, the php will not work on my dev.site2 vhost already but dev.site1 still working good and still can read php code like phpinfo(); below is my config.yaml file…
Mavichow
  • 1,213
  • 17
  • 41
2
votes
1 answer

Plesk: Overriding httpd.conf SSLCertificateFile via vhost_ssl.conf?

I am running a virtual server (Ubunto, Plesk 12). For the vhosts the settings are stored in httpd.conf, which is generated by Plesk. When having activated SSL-Support in Plesk, then Plesks default certificate is referenced, even when no certificate…
Thommy Tomka
  • 332
  • 1
  • 3
  • 14
2
votes
1 answer

Running two socket servers on same port

I have three servers Main server - which listens to all HTTP request Socket Server 1 : Listen to X types of socket request Socket Server 2 : Listen to Y types of socket request I want to run all three servers using same IP:Port combination and…
Aman Gupta
  • 3,627
  • 4
  • 40
  • 64
2
votes
1 answer

nodejs socketio multiple domains( separate io )

I have created 2 websites, that use socketio+nodejs( + 2 dev sites for them ). Now, i need to move the 2 sites into one server. To do that, i used express-vhost, and it works for everything...except for socket.io. In my apps, i have used hundreds of…
Rainer Plumer
  • 3,693
  • 2
  • 24
  • 42
2
votes
1 answer

HTTP Basic Auth not bring up password prompt in but in in Apache 2.4

Apache Version: 2.4.17 vhost.config: Listen 1449 DirectoryIndex /index.php index.php ServerName 200.000.000.00:1449 ServerAdmin myname ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:5000/custom/$1 …
RedGiant
  • 4,444
  • 11
  • 59
  • 146
2
votes
1 answer

Differences between the way WAMP and XAMPP handle vhosts?

I'm switching from WAMP to XAMPP and XAMPP has broken my vhosts. It won't allow access to them. "You don't have permission to access the requested directory. There is either no index document or the directory is read-protected." The Apache…
bcmcfc
  • 25,966
  • 29
  • 109
  • 181
2
votes
0 answers

Nginx-fpm "No input file specified" (non-root directory)

i need help in nginx-fpm, i'm facing a problem about "no input file specified." Here is my setting: /home/user/website/public_html <== my web-development directory /home/user/website/public_html <==symlink==> to…
metaphor
  • 470
  • 4
  • 13
  • 27
2
votes
0 answers

How to setup 2 domain on one XAMPP server on the same port?

I have two different PHP application running on XAMPP server. I need to be able to access both application using two different domain. The first application will be local to the server "dev.app". The second app will be accessible from the internal…
Junior
  • 11,602
  • 27
  • 106
  • 212
2
votes
2 answers

non-www. domain not redirecting to www. domain

In a nutshell WORKS FINE: www.exampledomain.co.uk{/with-any-url} GIVES 404 ERROR: exampledomain.co.uk{/with-any-url} In detail I am having an issue with a site running on linux/apache2 whereby 'www.' urls are working fine, however with the 'www.'…
ajmedway
  • 1,492
  • 14
  • 28
2
votes
1 answer

Redirect all to https://www.example.com

OK, so I know that nearly every variety of this question has been asked and answered on this forum, and many others, but I just can't seem to get it right. My hope is that if I provide enough specifics, including the process I'm following, that…
Beau Townsend
  • 333
  • 2
  • 10