This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Place an index.php file in your Apache's htdocs folder with the following content:
This way, when someone goes to the root, this index.php will be returned which tells the browser to go to SYL instead.
Note: you must have the PHP plugin enabled in Apache, and you may have to remove the existing index.html file.
Thanks Rob for the details, I'm using centos linux server, so i dont see the folder htdocs. How can i set it up in Centos ? Also im not using PHP, but JSP, is there a JSP plugin similar to PHP that needs to be enabled ?
Are you running JSP directly in Apache, or in Tomcat? The PHP part should go in Apache, not Tomcat. It is a plugin that would need to be configured. Alternatively you can do it in HTML as well:
As for the location, you may also want to try /var/www/html. If that also does not exist, check httpd.conf and look for the value of the DocumentRoot directive.
Joined: Dec 24, 2011
Thanks for the details, tried with the html option but could not make it work. In the httpd conf i can see the doc root set as var/www/html so created index.html and placed in html dir and restarted apache but didnt see any changes....not sure why its not working ...
You should be able to forward the entire site over using this pair of statements:
However, the key word there is entire. That would force ALL URL requests for that host to be proxied to the SYL webapp in Tomcat. Which is OK, if that's the only webapp you intend to serve up. A variation of that idea would be to define the Proxy for an alternate virtual host, which would have a different domain name in the URL.
Mixing Tomcat and non-Tomcat requests on the same host and trying to share the same domain hostname can be tricky and usually involves extensive use of the mod_rewrite module. That's because you need clear rules as to what subsections of the URL would go where.
Customer surveys are for companies who didn't pay proper attention to begin with.
Deep Nair wrote:Thanks for the details, tried with the html option but could not make it work. In the httpd conf i can see the doc root set as var/www/html so created index.html and placed in html dir and restarted apache but didnt see any changes....not sure why its not working ...
Is there perhaps also an index.php in the same folder? If that's the case this is probably seen as the default document, and served instead of the index.html. What happens if you go to www.mywebsitename.com/index.html?
Joined: Dec 24, 2011
Is there perhaps also an index.php in the same folder?
No there is no index.php in the same folder.
Also one more thing i have noticed is in IE if i type www.mywebsitename.com it resolves to the www.mywebsitename.com/SYL so its working in IE, but in Firefox its not working, in Firefox its still shows the Apache home page. So the index.html that you gave me earlier, does that need to be changed for Firefox compatibility ?
What happens if you go to www.mywebsitename.com/index.html?
I tried this in Firefox and its resolving to www.mywebsitename.com/SYL properly.... so not sure where the issue is.