[Answer ID: 14728]

How To: Host a web site (with php and MySQL support) on LinkStation

Created 09/26/2012 05:15  |   Updated 04/03/2013 05:46

LinkStation can be setup as a web server to publish web contents.

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

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

 

Enable Web Server
1.

Create a shared folder to store configuration and web contents. Enable access restriction and assign a (admin) user to access the folder.

A. Log in to management Web UI, navigate to [Shared Folder] - [Folder Setup], and click [Create Folder].
B. Click "Access Restriction" check box and click to add user.

Image

 

2.

Next, navigate to [Network] - [Web Server], then click [Modify Settings].

A. Enable Web Server function.
B. Set Port number (default 81).
C. Select Target Path (same directory from step 1). The drop down may take a minute to update the list.
D. Save the settings.

 

3.

You may skip this step. Optional, modify php.ini: as needed and save.

 

Enable MySQL server:

 

4.

Enable MySQL server: Navigate to [Network] - [MySQL server].

A. Click [Modify Settings].
B. Enable MySQL server.
C. Select a folder for MySQL database and configuration. You may select the same folder as in step 1.
D. Click [Save].

 

Image

 

 

 

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

 

 

\htdocs\index.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 to phpmyadmin using Web UI administrator's username 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 username, password and LinkStation's IP address. The % character is pattern replacement for any IP in same subnet address.

 

 

For more information, see simple login setup with php and MySQL on the NAS Web Server here.



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