Hi,
I'm currently configuring a personal server for my very first time. I've Apache 2 and JBoss currently working, and they are both connected using mod_proxy.
Assuming my server IP is myserverip, I'm currently able to access any JSP file deployed in JBoss without typing the :8080. (http://myserverip:8080/myjsp --> http://myserverip/myjsp)
But now I want to configure my apache server to use a JSP page as it's default page, instead of index.html. For example, I want to access http://myserverip/myjsp as http://myserverip .
Assuming that myjsp is a .war that I have deployed in JBoss.
Thanks
Open your Apache configuration file httpd.conf
Find out line that read as follows: DirectoryIndex
Now set it as per your requirements: DirectoryIndex /myjsp/
Save and close the file.
Restart the Apache web server.
Related
I'm using JHipster to build a web application (awesome project, keep going guys :).
I'm using a server where apache is already installed deploying a php app (http://www.myurl.com)
I'm trying to deploy my JHipster app under another url (http://www.myurl.com/my_project)
I tried :
rewrite rule to redirect /my_project http://localhost:PORT/my_project using my own tomcat install
using runnable jhipster war
changing some cong in yml file to add context under server > context-path
Nothing is working fine :
access to first page webapp ok but 404 to any other pages
blank page, unable to load resources because context is missing I think
doesn't change anything
Any other idea? Something I forget? Something related to webpack ?
Thanks for any help :)
Use apache(httpd) proxying to redirect calls to your jHipster application to your tomcat
the configuration is meant to be put in apache configuration files you must have proxying mod enabled in apache but if my memories are good proxying user sessions from apache httpd to tomcat can be quite tricky. The following syntax is what you are looking for
ProxyPass "/images" "http://www.example.com/"
ProxyPassReverse "/images" "http://www.example.com/"
https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html
Is there any way I create or upload a configuration file to weblogic server. The configuration file will be used by a java application deployed on the weblogic server. But I can use weblogic server admin console to update this configuration file and don't have to have someone go to the server and find this file and update it in an text editor.
Is this possible? If so, how can I do this.
You want Deployment Plans for your app. They allow you to customise an EAR or WAR's internal settings.
Bear in mind that early versions of WLS 11g had a bug where specifying a deployment plan at the same time as uploading an app didn't work through the console, and you had to upload, then apply the deployment plan in a separate step (or use WLST or a maven plugin to do it)
I have an application tomcat + apache + mod_jk + spring mvc deployed on remote server. After making request to the controller I am having jsp source code in the response. It is not related with spring config cause locally it is working. After debugging mod_jk I see that tomcat returns jsp source.
I think the problem is related with remote tomcat or apache (cause it was configured by our it department). Is it possible to dissalow jsp execution on tomcat or apache (maybe httpd conf)? Plese suggest how can resolve this problem.
Apache Web Server does not execute JSPs, so you're probably getting your JSP from there.
Normally, static files are deployed on Apache Web Server, and dynamic files (JSPs, Custom Tags, classes, etc.) are deployed on Apache Tomcat (where Apache Web server redirects the corresponding requests). Check if your app is deployed this way.
Try to send an HTTP request directly to the Apache Tomcat (without intervention of Apache Web Server, and see what happens)
The reason was that jsp compiler was disabled see org.apache.jasper.servlet.JspServlet, in the tomcat\conf\web.xml. It-team says that it is recommend option for production)
I have a rare problem, at least for me.
I have a project built in Java. Using Maven and Spring MVC. I define a couple of controllers to redirect between pages (.JSP).
I deploy my WAR project on Tomcat webapps folder. And everything seems fine.
Now when I access to the app from the server local IP (192.168...), everything works.
But, when I access from public IP, the only thing I get is the folders of the project, it's like the context configuration of Spring and controllers doesn't work.
Of course, I can to navigate to each page with the complete URL.
Already checked that both directions also point in the same folder.
Thanks in advance.
EDITED
I want to say that I configure apache and tomcat connector. So When I enter to my local IP with the :8080, my app works fine. But when I enter without it, I see the list of folders.
EDITED 2
My web server is Apache.
And my connector configuration is:
workers.properties:
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
/etc/apache2/mods-available/tomcat_connector.conf:
<IfModule jk_module>
# Tomcat Connector custom properties
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/jk.log
JkShmFile /var/log/apache2/mod_jk.shm
JkLogLevel error
JkMount /manager/* worker1
JkMount /host-manager/* worker1
</IfModule>
And the only thing that I add to /etc/apache2/sites-available/default is:
JkMountCopy On
I get some information from this tutorial:
http://blog.sourcerebels.com/post/28254180614/usar-apache-como-frontal-de-tomcat-en-ubuntu-server
Thanks!
I'm using log4j in a project that is being deployed to a clustered Weblogic 11g environment, and I'm trying to get the name of the server that has the app deployed on it to use for logs. I seem to remember that there is a way to get the running server name, but it is escaping me... here is the line from my log4j config for where I want to send the log output:
log4j.appender.MyRollingAppender.File=servers/${weblogic.Name}/logs/serverName.log
Right now everything is going into serverName.log for each server, but I would like to have the output go into a server specific file, i.e, server1.log for activity on server 1 and server2.log on server 2.
Use the variable instead of a static file name
log4j.appender.MyRollingAppender.File=servers/${weblogic.Name}/logs/${weblogic.Name}.log