How can I change host Name for Apache tomcat server? [closed] - apache

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I installed Apache Tomcat 6.0,I tested with simple Application it's working fine.but every time I calling my app with localhost:8080 in the browser.
I want to change host name(localhost) to something like subbu.for this I tried in the following way.
I open command prompt and entered drivers and after selected etc folder, open host file .in this file I changed subbu instead of localhost.After did this I restarted my system and started apache server and entered in my browser like subbu:8080.it's not working.
I hope,you understand what I faced problem.
How can I resolve this.

In /etc/hosts change the line
127.0.0.1 localhost
to be
127.0.0.1 localhost subbu

Related

How to access html file using local host [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
Please I need help with accessing my html/php file with localhost on my browser,i turn my xampp on and tried to access my html/php file,but it is still not working
That's what I keep getting everytime
The path component of the URL to your file starts at the directory specified in the DocumentRoot configuration option for your Apache HTTPD server. This probably defaults to the htdocs directory.
It doesn't start at the root of your filesystem. Web servers do not, by default, expose every file on your hard disk to the network (which would be a scary default for security reasons).
Normally you don't have to enter xampp/htdocs in the link. localhost is reffering to your xampp htdocs folder "automatically". Try localhost/phpinvscode
If you put your index.html file in the htdocs folder directly you would only need to enter localhost in the browser.

How to install/configure mod_reqtimeout in Apache [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need to configure mod_reqtimeout in my Apache server v2.2.22 (in a linux machine). Problem is, I have absolutely no clue on how to do it.
I checked the Apache site on this module at this link but there was no download/configuration details given.
Can someone help me on this ? Any help is much appreciated. Basically,
Is there something needed to download ?
If not, which files do I need to edit and how?
It's a standard Apache module from 2.2.15 and later, but is apparently missing in some distro versions (e.g. Ubuntu, FreeBSD).
First, check that mod_reqtimeout exists (e.g. look in apache2/modules/ or - depending on your system - do something like /usr/sbin/httpd -l | grep mod_reqtimeout). Second, if it is, make sure it's enabled in your Apache config.
mod_reqtimeout is available from GitHub (also see the RPM resource). Finally, this thread has some useful tips. BTW FYI I don't think it can be enabled in an .htaccess file.

Access new web site via browser with IP address? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Ive set up a new site with WHM but havent got the DNS set up yet. I want to be able to access the site via a browser so I can set up a CMS. Usually, I can just do this by entering the IP address into the browser, but this time I just get a page saying that Apache is working on the server.
Does anyone know a way round this?
Thanks!
The problem is that the request your browser is sending doesn't include the correct Host: in the HTTP header, so the web server replies with the a default catch-all page.
You can either
setup a private (local) authoritative DNS server with a yoursite.com zone, and set your system's DNS to point to this DNS server, or
temporarily trick the DNS resolution in your local system by registering whatever.yoursite.com with it's corresponding IP address in /etc/hosts file (in unix-like systems). There's an equivalent file in MS Windows systems, look for a file named hosts in C:\Windows\system32\drivers\etc.
I'd try with the latter first, as it's just a matter of adding a single line to a text file:
203.0.113.22 whatever.yoursite.com
You may need to restart your browser.

Tomcat Multiple Localhost Instances [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
What is the smartest way to configure Tomcat to have two localhost instances?
Please note that I do not have admin rights to the system, and so don't have access to the /etc/hosts file. I would love to be able to do something like the following, but can't modify my /etc/hosts files:
http://juststuffreally.blogspot.com/2007/03/enabling-multiple-localhost-sites-in.html
I'd like to have something like this, so that my instances of localhost would look as follows:
keith.localhost.com
joe.localhost.com
...but I can't modify my /etc/hosts file =-(
Another resource that I found was this, but this gives instruction for multiple outside domains--I need multiple localhost instances:
http://iam-rakesh.blogspot.com/2009/10/hosting-multiple-domains-in-tomcat.html
Any ideas?
Thank you for your help.
You can run multiple instances of tomcat on multiple ports. You would need a unique server.xml for each instance, and each one would need different ports defined in the appropriate <Server> and <Connector> elements.
Once everything is set up, you would specify an explicit port when connecting to the instance, e.g.:
- http://localhost:8080/
- http://localhost:8081/
This document covers the process in a little more detail.

Apache on Ubuntu and default website w/ VirtualHost [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
i've read that apache on ubuntu requires the first virtualhost file included will be the default website, so everyone prefixes the virtual host file with '000-'
is there anyway around this, such as using default or another option? i would like the default site to be a different file which i cannot change the name of the file so cannot prefix it with 000 (its a hard coded system, and the configs are generated automatically)