Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] virtual hosts jetty v9

Hello jetty users,

I need help setting up virtual hosts. I run jetty v9 within Smartfoxserver which is for game development. Currently I have 2 games. The structure looks like this:

/home/fo/SmartFoxServer_2X/SFS2X/www/root/index.html  is the index of game 1

/home/fo/SmartFoxServer_2X/SFS2X/www/jok/index.html  is the index of game 2

/home/fo/SmartFoxServer_2X/SFS2X/lib/jetty/  is the home directory of jetty

What I need to do is simply, if the user access the server via my public IP instead of the domain, serve him the index.html from game 2.

I created a context xml file in the directory


The file contains:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/home/fo/SmartFoxServer_2X/SFS2X/www</Set>
  <Set name="resourceBase">/home/fo/SmartFoxServer_2X/SFS2X/www/jok/</Set>

  <Set name="virtualHosts">
    <Array type="java.lang.String">

Unfortunately it doesn't work: if I type the IP I still get the index.html of game 1. Any help would be greatly appreciated.



Back to the top