0

I currently run an Apache server with Ubuntu 14.04, and also have a TOMCAT server and a Calibre server (running on port 8080 and 8081 respectivly).

I can reach them throught firefox by typing

http://localhost:8080 // For TOMCAT
http://localhost:8081 // For Calibre

I'd like to know what should I tweak or set to be able to reach them by typing

http://tomcat.localhost/ or http://localhost/~user/tomcat

and

http://calibre.localhost/ or http://localhost/~user/Calibre

(I'd like best the first option if possible)

Is this possible to do this without installing a DNS server? (I can use it if needed, but I'd be happier not to use a technology I'm not comfortable with)

I tried a PHP include or redirection in localhost/~user/Calibre/index.php, but this is verry inelegant (and I couldn't get it to work properly anyway)

The goal is to have it used on different computer on my local network (so cross navigators and cross computer compatibility is a better solution, but I'd be happy if it work only on my computer for the moment).

Any help would be greatly appreciated.

Thanks a lot

1 Answer 1

1

You should create a virtual host to use multiple domain..Follow the article to archive this..Let me know if you have any queries. https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Sign up to request clarification or add additional context in comments.

2 Comments

On first look this is most likely what I need, but I see that by using your link, I have to use a fully new domain, which is not what I'm looking for. Do you know any way to do the same thing but for a subdomain?
tomcat.localhost and calibre.localhost are two different domains you have. We have to specify the directory path in .conf file. Let say tomcat files in /var/www/user/tomcat and calibre files in /var/www/user/tomcat/calibre. Apache will take care of what file to use.. Here domain and sub-domain depends on what directory path you specify..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.