[Answer ID: 14723]

How To: Set up Web Server (php and MySQL) on the TeraStation

Created 09/26/2012 04:51  |   Updated 09/27/2013 06:30

TeraStation can be setup as a web server to share web contents publicly or privately .

The WEB hosting feature is implemented by a dedicated Apache web server, MySQL Data Base server and PHP support.

For More Information, see simple login setup with php and Mysql on my NAS Web Server here.

 

The following is the procedure on how to enable Web server and MySQL on the TeraStation.

 

Enable WEB Server

 

1- Start by creating a folder to store configuration and web contents. Next, enable access restriction and assign a user (admin) to access the folder.

    A. Log in to management WEB UI and navigate to Shared Folder -> Folder Setup and click Folder Setup configuration button and followed by [Create Folder] button.

    B. Click Access Restriction option and select local users tab.

    C. Add a user (admin for example) to W/R access the folder.

2-Next, Navigate to Services and click Web Server configuration button (2):

 

Image

 

Image

 

    A. click [Edit] -> [Browse] button to select target folder from step1.

    B. Set Port number (default 81)

    C. Click [OK] to save settings.

    D. Optional,  you may skip this step:  click [Edit php.ini] to modify php.ini as needed and click [Apply] to save modifications.

 

3- Click Web Server Enable button (3) shown below.

 

Image

 

Enable MySQL server:

 

4. Enable MySQL server: Navigate to  Services and click MySQL Server configuration button.

    A. Click [Edit]->[Browse] button to select target folder from step 1.

   B. Optional, change default port.

    C. Click [OK] to save settings.

Image

Note : MySQL web console is available from [phpmyadmin] button.

htdocsindex.php

 

Subfolder htdocs in specified folder (from step 1) is where the Web server looks for the published web pages.

Modify index.php or replace it with index.html to test the setup.

WEB Server URL

The URL to WEB server is IP_address:Port_Number.

From the LAN (intranet), to access the web server simply enter the IP address of the NAS device and the port number (for example http://x.x.x.x:81).

If you are planning to access the device from internet, setup static IP address for the NAS device and on your router, setup DDNS & NAT table to forward http port 80 on WAN port to port X (81) on LAN.

To test your setup see sub folder htdocs. Copy a web page to this directory and try to access it from a browser.

MySQL Server access

Navigate to  Services and click MySQL Server configuration button.

MySQL web console is available from  [phpmyadmin] button. Log in using WEB UI administrator's user name and password (admin/password).

 

To remotely access MySQL server using any 3rd party client GUI such as MySQL Work Bench

in phpmyadmin SQL web console type:

GRANT ALL ON *.* to admin@'192.168.20.32' IDENTIFIED BY 'password';

or  for any IP in same subnet address:

GRANT ALL ON *.* to admin@'192.168.20.%' IDENTIFIED BY 'password';

replace admin, password and IP with user name, password and TeraStation's IP address. The % character is pattern replacement for any IP in same subnet address.

 



Details


Products

OS / Hardware

Was this answer helpful?
Please tell us how we can make this answer more useful.

Refine your search

Select Product / OS & Hardware

      Enter Keywords or a specified ID