• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Website and Game Server on separate hosting company

Newbie Spellweaver
Joined
Sep 3, 2012
Messages
14
Reaction score
0
Is it possible that website and game server are located on different hosting company?

No problem on the game server side. But what about the website?
Example:
- Game Server is on Staminus DDS
- Website (MUCore or other MUWeb) is on Hostgator webhost.

How can I make the website access the database hosted on Staminus? And is it safe?

What's the advantage and disadvantage in this setup?
 
Kingdom of Shadows
Loyal Member
Joined
Jul 13, 2007
Messages
923
Reaction score
320
Advantages:
- saves on bandwidth
- saves on CPU & RAM on big servers
- when your website is (d)dosed it will help you keep your gameserver up

Disadvantages:
- exposure of MSSQL remote connection which may lead to several attacks
- big latency between the 2 servers because they are in different locations possible on different continents too depending on the hosting company
- if your MSSQL is not good configured it can delay the gameplay too

I would suggest you to go for a static content hosting and put there the cache-able content like javascripts, css, static images. The resources used by MU's websites are pretty low(PHP + cache in memory) and don't require a fully separated server unless you have some big numbers on unique visitors. If you still decide to work on separated servers than the best solution is to locate the servers on the same datacenter and ask for a closed private network between your servers only. This will give you a low latency connection of high speed and your visitors will not encounter any delay.
 
Newbie Spellweaver
Joined
Oct 16, 2008
Messages
35
Reaction score
0
and how we make the connection between website and server ? i am hosting myself the mu server and my website i want to host at a hosting company in my country. the ping between me and hosting company is like 2-4 maximum 5. I don't know if it will be so big latency.. but i want to try but i need to know how to make the connection using mu core 1.0.8

tnx, waiting for a reply
 
Initiate Mage
Joined
Jun 28, 2012
Messages
4
Reaction score
0
Buy a shared host with windows/plesk.
Turn free the SQL remote port
In IP/host of website's config file you insert the VPSIP,SQlPort. Like: 127.0.0.1,1433
Remeber: verify with bussiness if your services is compatible.

Sorry my bad english
 
Newbie Spellweaver
Joined
Feb 19, 2012
Messages
10
Reaction score
0
This can be possible doing this:

Site hosting contains:
- Website whit connection to MSSQL (Using php and anti DDoS system).
* Register (Preventing DDoS, use captcha, in case of alot of captcha fails block the IP from apache)
* Character CP (Using captcha too)
* Server stats (update every 10 minutes and save values in site part).

VPS or Dedicated server machine:
- Mu Server files (Running ¬¬).
- MSSQL (Add a password and bind the site host ip in MSSQL configs).

______
Doing this the server will not have simple DDoS attacks (Or almost the webpage will be down), whitout lagging too much the gameplay.
 
Newbie Spellweaver
Joined
Dec 25, 2008
Messages
38
Reaction score
1
You need create your own PHP API.

(A) VPS or Dedicated server machine:
+ Mu Server
+ MSSQL Dataserver
+ IIS (Apache) with security mod or any like this (IP filter for port 80)

(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)


Advantage:

Build PHP API Server, and place it on your (A):

PHP API Server:
+ You can use GET or POST method, GET is recommended.
+ You need setup your own access token (for security)
+ Respond as JSON data (simple to filter data) or text/html

Place PHP API Client on (B):
+ Use cUrl (or ...) to make a GET or POST request to your API Server
+ Verify json data from your API Server, if true => alert success,...


Example register:

+ Server API, place (A):
PHP:
<?php
// API Server
// Include your database connector here
// Sample as $database

// Access token
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";

$account = $_GET['account'];

$password = $_GET['password'];

$email = $_GET['email'];

$personal_id = $_GET['personal_id'];

if($access_token != $_GET['token']) die('Cannot process');

function check_account_exist($account) {
	// I am using basic method
	$test = $database->query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='".$account."'");
	if(isset($test['memb___id']) AND $test['memb___id'] == $account) {
		return false;
	}
	return true;
}

if(check_account_exist($account)) {
	$data = array(
		"respond" => true
	);
       
        // Run INSERT Query to add new account here

} else {
	$data = array(
		"respond" => false,
		"error_code" => 1
	);
}

die(json_encode($data));

?>

+ Client API, place (B)
PHP:
<?php
if($_POST['submit']) {

	// Example you already have cUrl class
	// Call it as "cUrl_send"

	$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";

	$data = cUrl_send("http://YOUR_SERVER_API_IP/register.php?account=".$_POST['account']."&password=".$_POST['password']."&email=".$_POST['email']."&personal_id=".$_POST['personal_id']."&token=".$access_token);

	$data = json_decode($data);

	if(isset($data) && is_array($data)) {
		if($data['respond']) {
			// Register success
		} else {
			// Failed, show error code
			die("Failed, error code ". $data['error_code']);
		}
	}
	else {
	// Error
        // Something like
	die("Cannot connect to gameserver");
	}
}
?>

<form method="POST">
<input name="account" type="text">
<input name="password" type="text">
<input name="email" type="text">
<input name="personal_id" type="text">
</form>

You need to add captcha.

Do not open MSSQL port as public.

Use this solution will help your server very very more security

Advantages:
- saves on bandwidth
- saves on CPU & RAM on big servers
- when your website is (d)dosed it will help you keep your gameserver up
 
Last edited:
Newbie Spellweaver
Joined
May 12, 2012
Messages
81
Reaction score
5
Very interesting, but possible for more about the installation and configuration?
---------------------------------------
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ IIS (Apache) with security mod or any like this (IP filter for port 80)

(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)

Example register:

+ Server API, place (A):
PHP Code:
+ Client API, place (B)
PHP Code:
----------------------------------------
How to organize it all? Waiting for an answer
 
Newbie Spellweaver
Joined
Dec 25, 2008
Messages
38
Reaction score
1
Very interesting, but possible for more about the installation and configuration?
---------------------------------------
You need create your own PHP API.
(A) VPS or Dedicated server machine:
+ IIS (Apache) with security mod or any like this (IP filter for port 80)

(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)

Example register:

+ Server API, place (A):
PHP Code:
+ Client API, place (B)
PHP Code:
----------------------------------------
How to organize it all? Waiting for an answer

You need to learn basic PHP/MSSQL (ASP/MSSQL).

(A) In PHP Code, you need add MSSQL connection info, call it as $database = new class(xxx), write a member query function.
(A) You need write a cUrl function to send/recv GET data

(B) You need write a cUrl function to send/recv GET data
 
Newbie Spellweaver
Joined
Oct 23, 2012
Messages
24
Reaction score
18
If you want to make that, you have to open the MSSQL port (1433) and write the config that it connects to it...ex: 123.123.123.123:1433
 
Experienced Elementalist
Joined
Mar 6, 2012
Messages
241
Reaction score
153
You'll have two big problems with it, but you can do some tricks too.

1 - You'll have to "expose" your MSSQL port:
You can change the default port (1433) and add some security, like trusted connection and IP restrictions to have a better security.

2 - You'll have send connection data over INTERNET.
SQL already have a good encrypt algorithm, but you can improve it and add server data encrypt on it.


You can also use a service like CloudFlare to reduce some of this problems and help to improve your security.



Best regards,

Afonso Lage.
 
Newbie Spellweaver
Joined
May 12, 2012
Messages
81
Reaction score
5
Connections which package to choose? there is a host on Linux
On my hosting Frey TDS 8 and does not work.
 
Experienced Elementalist
Joined
Mar 5, 2011
Messages
258
Reaction score
39
I highly recommend to host your website on a diffrent plaftorm than your servers plaftorm.
 
Newbie Spellweaver
Joined
Oct 29, 2011
Messages
29
Reaction score
35
You need create your own PHP API.

(A) VPS or Dedicated server machine:
+ Mu Server
+ MSSQL Dataserver
+ IIS (Apache) with security mod or any like this (IP filter for port 80)

(B) Website hosting (only need linux):
+ PHP Website with MySQL
(+ You can seperate Website (No database) and character CP)


Advantage:

Build PHP API Server, and place it on your (A):

PHP API Server:
+ You can use GET or POST method, GET is recommended.
+ You need setup your own access token (for security)
+ Respond as JSON data (simple to filter data) or text/html

Place PHP API Client on (B):
+ Use cUrl (or ...) to make a GET or POST request to your API Server
+ Verify json data from your API Server, if true => alert success,...


Example register:

+ Server API, place (A):
PHP:
<?php
// API Server
// Include your database connector here
// Sample as $database

// Access token
$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";

$account = $_GET['account'];

$password = $_GET['password'];

$email = $_GET['email'];

$personal_id = $_GET['personal_id'];

if($access_token != $_GET['token']) die('Cannot process');

function check_account_exist($account) {
	// I am using basic method
	$test = $database->query("SELECT memb___id FROM MEMB_INFO WHERE memb___id='".$account."'");
	if(isset($test['memb___id']) AND $test['memb___id'] == $account) {
		return false;
	}
	return true;
}

if(check_account_exist($account)) {
	$data = array(
		"respond" => true
	);
       
        // Run INSERT Query to add new account here

} else {
	$data = array(
		"respond" => false,
		"error_code" => 1
	);
}

die(json_encode($data));

?>

+ Client API, place (B)
PHP:
<?php
if($_POST['submit']) {

	// Example you already have cUrl class
	// Call it as "cUrl_send"

	$access_token = "ga45g6a5s4g3as31a5h9874g64a3s1fas32fasfasf65as4f6";

	$data = cUrl_send("http://YOUR_SERVER_API_IP/register.php?account=".$_POST['account']."&password=".$_POST['password']."&email=".$_POST['email']."&personal_id=".$_POST['personal_id']."&token=".$access_token);

	$data = json_decode($data);

	if(isset($data) && is_array($data)) {
		if($data['respond']) {
			// Register success
		} else {
			// Failed, show error code
			die("Failed, error code ". $data['error_code']);
		}
	}
	else {
	// Error
        // Something like
	die("Cannot connect to gameserver");
	}
}
?>

<form method="POST">
<input name="account" type="text">
<input name="password" type="text">
<input name="email" type="text">
<input name="personal_id" type="text">
</form>

You need to add captcha.

Do not open MSSQL port as public.

Use this solution will help your server very very more security


Need security in your code.
 
Junior Spellweaver
Joined
Jul 19, 2005
Messages
140
Reaction score
0
Its so simple... dont unblock 1443 ... just add the ip you want to grant acces in your firewall`s ip exception list...
 
Newbie Spellweaver
Joined
Jan 17, 2013
Messages
7
Reaction score
0
any recomendation for VPS or DDS hosting for R that wont lagg on different countries?
 
Banned
Banned
Joined
Dec 14, 2005
Messages
157
Reaction score
36
i did some research you use :






all are with ddos security just select one.
 
Back
Top