Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed a webapp (sakai precisely) in a CentOs 6.2 server. sakai is accessible via @ip:8080/portal, and I need to replace that adresse by a normal URL:

I've already replaced:

#<VirtualHost *:80>
# ServerAdmin
# DocumentRoot /www/docs/
# ServerName
# ErrorLog logs/
# CustomLog logs/ common


<VirtualHost @ip:80>
DocumentRoot /var/www/cmcf
ErrorLog logs/
CustomLog logs/ common

(I also tried <VirtualHost @ip:8080> since my webapp is accessible via @ip:8080/portal but in vain)

but when I try to reach sakai from the browser, I get the 404 error:

**Not Found
The requested URL /portal was not found on this server.
Apache/2.2.15 (CentOS) Server at Port 80**

I also tried to make "/opt/apache-tomcat-7.0.29"(where sakai is deployed) the DocumentRoot, (It is probably a very huge mistake, but it's the first time I manage apache, so...) and I've got the same 404 error.

I'll be pleased to get any of your suggestions.

share|improve this question

closed as not a real question by Chopper3, Tim Brigham, Ward, HopelessN00b, Ladadadada Oct 8 '12 at 12:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

The Sakai Admin Guide has information on deploying your Tomcat app with Apache.

Basically, you will want to set up Apache as a reverse proxy of some sort, either using the basic reverse proxy configuration (mod_proxy) where you have something like this:

ProxyPass /sakai http://localhost:8080/portal
ProxyPassReverse /sakai http://localhost:8080/portal

where Tomcat is listening on localhost:8080.

The alternative is to set up Apache with mod_proxy_ajp, which will cause Apache to talk to Tomcat in a more native fashion. For a simple setup, you can get away with using mod_proxy. After that, you should get a better handle on how your webstack works, in terms of how the web server (Apache) and the application server (Tomcat) relate to each other.

share|improve this answer
Thank you so much for the answer and excuse me for the delay. Would you give some more explanations about the mod_proxy. I'm new to apache, so it's a little bit hard for me to apply what you've told me. should I input the two commands you gave me in the httpdconf file? and where should I write the "url" that must replace the ip@?? Thank you – ijlal Sep 1 '12 at 23:15
@ijlal I've updated my Answer to better reflect the paths that you had in your question. Please look at the mod_proxy documentation at for more information. You should also be able to google for "apache mod_proxy examples" for more usage tips. – cjc Sep 4 '12 at 13:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.