Where might virtual hosts be configured to use https? - ssl

I'm trying to setup a virtual host with https on a ubuntu server with a number of other virtual hosts.
None of the other virtual hosts make any explicit mention of ssl, and there are no specific host based references in the apache2.conf or httpd.conf. However when i prefix their url's with ssl they load with no problem.
My virtual host has exactly the same declarations but when prefixed by https it does not work and instead the page just seems to hang or continually load.
How might these other hosts be configured to use ssl?
Thanks,

This article helped me setup virtual hosts with https for my testing. Here is the article http://www.codealpha.net/631/name-based-virtual-hosts-with-ssl-using-apache2-on-ubuntu-lucid/

Related

httpd proxy any domain

Is it possible to configure a vhost on httpd that accepts any domain received and proxies to the actual website? Like subdomain wildcard but for the domain.
I'm assuming that tools like Squid Proxy can do this just fine, I'm just curious if it can be done with apache.
Sure that is possible, but you don't even need a proxy for that. The apache http server offers the concept of a "default virtual host". Which is exactly what you want: that host is responsible to respond to incoming requests to http hosts that do not have a specific configuration.
The default typically simply is the first of all hosts defined inside an apache http server.
An alternative I personally use is to setup the virtual hosts by just a basic configuration (name, admin and the like), but to include the actual content configuration (DocumentRoot and rewriting stuff) from a separate file). That way you can easily share the same setup between many virtual hosts but still have individual configuration options per domain, subdomain, http host, however you want to call that (there is no difference for the http server anyway, it is all http hosts).

configure two dydns websites of IIS with two different SSL ports and configure port forwarding for both

I have two iis websites. One I have a localhost on port 80 and was setup for dydns with ssl port forwarding external: 443 and internal port:1124 and the website is working perfectly with dydns access.
I wanted to setup another website with the ssl port but was unable to do so. As when I set the port forwarding external Ssl:443 and the internal ssl port:1129. the other dydns entry redirects to the first website. This website does not work without https.
So. How do I setup two websites for ssl port forwarding on the same machine?
Any help is appreciated.
You don't necessary need an entirely different port for each website you host on the same machine. You can use the same http/80 and https/443 to serve multiple website through virtual hosts.
I'm not familiar with IIS, but I do know that it's possible on IIS just like Apache and NGINX does. You can read about setting up virtual hosts on IIS here. Also I answered a similar question here.

Allow only specific domains

I have an apache 2.4 server with some virtual hosts, let's say I have aaa.com domain and a few subdomains, bb.aaa.com and cc.aaa.com, currently I want apache server to listen only aaa.com and bb.aaa.com and ignore cc.aaa.com or just redirect cc.aaa.com to aaa.com (btw I have no virtual host for cc.aaa.com).
So my objective would be to allow connections only from aaa.com and bb.aaa.com, any other connection (from direct IP or any other subdomain not handled by virtual hosts) should be redirected to aaa.com or just refused.
I did not found any solution for this, actually I am not even sure if it's possible.
If you don't have a virtual host for cc.aaa.com and if this domain is pointing to your server then by default apache will enter into the first virtual host. So you might want to set the redirect here.

Configure virtual host on Apache

I have a VPS with a single IP address and with Virtualmin/Webmin installed. I have created a virtual host *example.com *that will answer to www.example.com (the domain already points to the IP address of the VPS). However, when I access www.example.com I am not seeing the website I have uploaded for example.com but rather the default server:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
What should I do? Do I have to configure DNS or something?
Yes, you will need to configure DNS for your www.* site if it has not been done already. This www.* alias may have been created automatically when you set up the domain in DNS, but perhaps you will need to specify it explicitly.
Seeing the message "It works!" is a common issue. Apache has a default virtual host which you may want to disable. Exactly how to do that depends on the platform of your web server (it's a good idea to mention the platform and version when asking questions).
For example, if you have shell access to a Debian or Ubuntu machine, you can use the command:
sudo a2dissite default
In virtualmin there may also be an option for this, see for example http://www.virtualmin.com/node/15854
Once you have DNS set up and the www.* domain responding correctly to pings with IP of your server, you will also need to make sure that the virtual host definition for your site includes the www.* alias.

one server many http domains and one https domain

I haven't been able to solve an issue with my server:
I use a linux server, Debian 7.0 distro.
I am hosting many different domains, all except one, are plain http domains which I can easily redirect using virtual hosts on httpd.conf or apache2.conf. The problem I can't solve is with one domain, which requires SSL, so I need to force redirect http to https. I worked on virtual host of that specific domain, and managed to get http to https redirect, but now, all remaining domains are forced also to the https domain. How can achieve each http domain redirects to it's own, but also the requires SSL domain redirects to https?
Thanks
If you are using some versions of Apache, I know as late as version 2.2, you will need to include the line:
NameVirtualHost *:80
before your virtual host lines. I can't be sure that this is your problem, but I just had the exact same thing happening to me on Arch, which apparently doesn't have the latest Apache.