Setting up a virtual host in Webmin - virtual

I set up a virtual host in a Linux server running Webmin 1.580. I gave it a server name and a document root directory. How do I access the website under the virtual host from the internet?
Am I supposed to type the server's IP address and then the name? That's not working. It says:
Error - File not found
Is there anything else I need to do to make my site live on the server?

You should probably be using Virtualmin, in addition to Webmin, if you're going to be doing web hosting with the system. It makes most elements of the process a lot easier. The installation script will install all of the additional software you need (like BIND), and provides a friendlier GUI for web hosting tasks.
You can download it here: http://www.virtualmin.com/download
It is available in a free Open Source version, and is developed by the same people as Webmin.

Related

Trouble connecting to Docker application via subdirectory instead of port

Preface: I'm new to the whole web hosting thing, so I apologize if any information I give doesn't make sense or is inaccurate. I will do my best to explain things.
I currently have a self-hosted server running Windows Server 2019 that is hosting two sites via IIS. I recently have created an application that runs on a Docker container instance that hosts a website on port 40444. I would like to access this site via a specific subdirectory on my website instead of the port (www.mywebsite.com/website3 instead of www.mywebsite.com:40444). For clarification, here is an example of what I'm looking to do:
www.mywebsite.com/website1 (hosted on IIS)
www.mywebsite.com/website2 (hosted on IIS)
www.mywebsite.com/website3 (hosted on docker via port 40444)
I was able to get a basic reverse proxy set up and successfully got the docker application to show on localhost/, but I would prefer using a subdirectory if possible.(image below).
I attempted to change (.*) to (.*)website3$ and it did what I wanted, but the website cannot load any files (i.e css, js, etc.) and gives me the following error
https://www.mywebsite.com/css/style.css net::ERR_ABORTED 404 (Not Found)
If IIS isn't the best option to accomplish what I need I am more than happy to use a different solution. As I mentioned before, I'm new to web hosting and it was just the simplest to set up.

Access Rails App Subdomains Through VirtualBox

I'm running a Windows 7 VirtualBox on my Ubuntu 13.10 machine where I have my rails app. I access my rails app through subdomains (i.e. subdomain1.lvh.me:3000) and I'm trying to access these same subdomains through my VB. I've read to change the host file but I haven't been able to make it work. Would I be using the Gateway IP or the IPv4 address?
The reason for me trying to accomplish this is to develop on my Ubuntu machine and test for IE issues on my VB without using paid third party websites to render my changes.
I think that if, for example, your ubuntu machine's ip address is 192.168.0.123, then it should suffice to have this line in your windows hosts file
192.168.0.123 subdomain1.lvh.me subdomain2.lvh.me subdomain3.lvh.me
Then on your windows vb you would access subdomain1.lvh.me:3000 like you say.
Have you done this? I don't know what you mean by " I've read to change the host file but I haven't been able to make it work. " What isn't working?

How to publish a JSP Webpage created with Netbeans?

I want to allow others to access my website created through Netbeans but I don't know how to do so. Ive searched and I found that you had to buy webservers and domain names?
However, I only want to host the webpage using my own computer since it isn't really anything commercial. How can I publish the webpage using Netbeans or my own computer? Would using IIS of Windows be possible?
Thanks!
You can download or use (if you have installed) Apache-Tomcat to deploy your web-app on your local machine.
Text from the above mentioned link.
It is possible to deploy web applications to a running Tomcat server.
If the Host autoDeploy attribute is "true", the Host will attempt to
deploy and update web applications dynamically, as needed, for example
if a new .WAR is dropped into the appBase. For this to work, the Host
needs to have background processing enabled which is the default
configuration.

Remotely viewing web pages served by pow.cx

Using WEBrick you could navigate to an app you were serving from another device/virtual machine by navigating to your.ip.address.here:port
Is it possible to do something similar with pow.cx?
The latest version of Pow (0.4.0) now includes xip.io support. You can read about the release here.
Here's a quick explanation of how this helps Pow serve your Rails apps across your entire local network, from their post:
Say your development computer’s LAN IP address is 10.0.0.1. With the
new version of Pow, you can now access your app at
http://myapp.10.0.0.1.xip.io/. And xip.io supports wildcard DNS, so
any and all subdomains of 10.0.0.1.xip.io resolve too.
Here's a description of xip.io, from their site:
xip.io runs a custom DNS server on the public Internet. When your
computer looks up a xip.io domain, the xip.io DNS server extracts the
IP address from the domain and sends it back in the response.
There are basically two options:
Don't use pow: run your applications on localhost as usual and access them as usual
Edit the hosts file (or local DNS) to point your server machine ip
Example accessing from a virtual windows machine:
Suppose you are running two rails applications in pow: store.dev and auth.dev, and you want to access them from a windows xp virtual machine to test them with IE, you only need to edit your hosts file to add the lines:
C:\WINDOWS\system32\drivers\etc\hosts
# Allow to access applications in pow.
# The ip address points to the host machine localhost, that usually is the default gateway
10.0.2.2 store.dev
10.0.2.2 auth.dev
And then open the IE browser to access your applications in http://store.dev and http://auth.dev respectivelly.
Specifically, no, because Pow uses the Host header of the request to determine which app you need to access. To get that working remotely, you would have to have the remote machine map the required domain name to your IP address - either with a local DNS server or by editing the HOSTS file. Both of which are possible but annoying.
The simplest thing to do in that case is to start up a standalone Rails server as you mentioned (using ./script/server or rails s depending on the version), and then you can address http://[ip address]:3000 as before.
In other words, Pow works because it intercepts your local domain resolution, something that isn't affected by (or available to) remote machines.

A file's web address is different from the local file structure

I'm not sure how best to describe this (as you can clearly tell from the title) so I'll give you an example:
I have a multisite Drupal installation. Each of the sites' sitemap.xml files are located on the server at /sites/example.com/files though with a browser (and to search engines) it is accessible at example.com/sitemap.xml
I was wondering how this was achieved? Is this called Virtual Directory?
Thank you
They are VirtualHost , if you install a multi site Drupal, you must Apache (or other web server) with different virtual hosts.
This virtual hosts resides in different directory and respond to different domain names! The trick is done by your webserver.
For drupal check: http://drupal.org/node/43816

Resources