Hosting a website - basics

Questions about hosting a Website, using MySQL and PhP may be posted here.
Forum rules
This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu

Hosting a website - basics

Postby DeltaNu1142 » Mon Mar 05, 2012 5:33 pm

I am able to access DSM from inside & outside of my network using local IP/remote IP/dynamic DNS updater. I checked the boxes under Control Panel - Web Services - Web Applications for Enable Web Station and Enable personal website. When I did that, a new folder "home" was created on my DS. I put a test index.htm file in that folder, but I haven't been able to view it in my browser from within my network by typing:

http://192.168.1.7/home/index.htm

...and I haven't been able to get at it from the outside, either.

What am I doing wrong? I'm confident in the HTM file as a test, I used to write HTML.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby HarryPotter » Mon Mar 05, 2012 6:10 pm

The folder created by Web Station is "web", not home. The index file has to be put there and the url is http://192.168.1.7
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1636 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12395
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Hosting a website - basics

Postby sjeph8je » Mon Mar 05, 2012 6:15 pm

The personal website can be reached by http://nasIP/~username.

This is not the same as enabling web station, this will generate a /web folder on you volume which can be used for websites url is: http://nasip/
Synology DS-209 | DSM 4.1-2668 | 2 x WD20EARS (RAID1) (Time Backup | PhpMyAdmin | PhpLdapAdmin | PhpPgAdmin | Mailstation 2 | Svn | Directory server | Syslog server)
  • USB Conceptronic CHD3SU | WD20EARS (Ext-4)
Synology DS-209 | DSM 4.2-3202 | 2 x WD5000AAKS (RAID0) (syslog server)
  • USB Conceptronic CHD3NET | WD5000AAVS (Ext-4)
Corruption wears infinite disguises.
User avatar
sjeph8je
Knowledgeable
Knowledgeable
 
Posts: 324
Joined: Fri Jan 29, 2010 10:06 pm
Location: Netherlands

Re: Hosting a website - basics

Postby DeltaNu1142 » Mon Mar 05, 2012 6:16 pm

HarryPotter wrote:The folder created by Web Station is "web", not home. The index file has to be put there and the url is http://192.168.1.7

Well... I originally created a folder manually called "web", and then deleted it based on reading the forums. I understood that it would be created when I enabled Web Services. However, the folder that was created was called "home", not "web".
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby DeltaNu1142 » Mon Mar 05, 2012 6:18 pm

sjeph8je wrote:The personal website can be reached by http://nasIP/~username.
This is not the same as enabling web station, this will generate a /web folder on you volume which can be used for websites url is: http://nasip/

OK, I see. Well, I've attempted to reach that (both with the tilda and without) from outside using my DDNS URL and I receive the Synology page not found error.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby DeltaNu1142 » Mon Mar 05, 2012 9:41 pm

OK--I'm trying to update this thread with progress, but my replies require approval... so I'm not sure when this will appear. There's one I tried to post several hours ago that still isn't here.

I decided to try the "Personal Website" because all I really want to put together right now is a landing page. I disabled all of the Web Service features and deleted my "home" directory... the "web" directory never appeared on its own.

I then checked the box for "Enable personal website", which created the "home" folder. Then I followed these directions from DSM Help:

Enable Personal Website
The personal website function is a convenient way to allow local users to create their own personal website. Each user will have a unique website address "server-IP/~username" or "server-name/~username", for example:
192.168.1.1/~johnlee
SynologyNAS/~johnlee
Note: Before you enable this feature, make sure the "User Home" function has been enabled.
To create a personal website:
Create a folder "www" in the user home directory.
Upload web pages in the "www" folder.
To customize the error page:
Save the error page as missing.html, missing.htm, or missing.php.
Upload the file to the "www" folder.
When users link to a page that does not exist in the local user’s website, the customized error page will be displayed.

I created the www folder and put in an "index.htm" and a "missing.htm". I used my dyndns to access the page. Oddly enough, when I type "http://xxxxxxxxx.dlinkddns.com/~user/www/index.htm" my custom error page comes up... so I know I'm getting through. However, nothing I've tried allows me to show my index.htm file.

Any thoughts? It seems like the "Web Station" would be more versatile, but I can't get anywhere with that.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby DeltaNu1142 » Mon Mar 05, 2012 10:38 pm

Incidentally, I've also tried removing the "User home" feature, then unchecking "Enable personal website", deleting the "home" folder, then checking "Enable Web Station". It doesn't create a "web" folder.

I'm treating "personal website" and "Web Station" like radio buttons, since it seems they do two completely different & somewhat competing things.

I'd really like it if these posts actually made it to the thread.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby HarryPotter » Mon Mar 05, 2012 10:46 pm

Why are you always adding the folder name (www, home)? We gave you both the correct url.

If you have the index file in /web, the url is http://IP_of_DS
If you have the index file in /home/www (and personal websites enabled), the url is http://IP_of_DS/~username
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1636 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12395
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Hosting a website - basics

Postby axj » Tue Mar 06, 2012 12:23 am

I don't know why, but it works only in a folder named www (for me)!
DS509+ 4*1TB Raid+1TB DSM 4.0-2219. Logitech BOOM+Duet 7.6.1, WebCam: Linksys WVC54GCA + TrendNet TV-IP121
DS212+ 1TB & D-Link DIR-685, HP C7280, Dell 3100cn. iPad3, Programming Pascal, Clarion 5.5, html/php. http://axj.dk
User avatar
axj
Specialist
Specialist
 
Posts: 1058
Joined: Fri Jan 02, 2009 10:59 am
Location: Esbjerg, Danmark

Re: Hosting a website - basics

Postby DeltaNu1142 » Tue Mar 06, 2012 2:14 am

HarryPotter wrote:Why are you always adding the folder name (www, home)? We gave you both the correct url.
If you have the index file in /web, the url is http://IP_of_DS
If you have the index file in /home/www (and personal websites enabled), the url is http://IP_of_DS/~username

Well, I've yet to see the DSM create a folder called "web"... as I understand it, the "web" folder is created automatically when Web Station is enabled. Well, that doesn't happen for me. I checked the box then rebooted the DS, and still no "web" folder.

Using the "personal website" option, the "home" folder IS automatically created. I then create a subfolder called "www" and put my index.htm file and my missing.htm file into that folder. When I go to http://xxxxxxxx.dyndns.com/~user/ I actually get missing.htm. When I remove missing.htm, I get a Synology page not found error. I've even tried http://xxxxxxxx.dyndns.com/~user/index.htm. I don't understand why index.htm isn't appearing. I have tested both locally in a browser.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby HarryPotter » Tue Mar 06, 2012 12:39 pm

axj wrote:I don't know why, but it works only in a folder named www (for me)!

Yes, thats where the files have to be put, but the URL to access the page is without "www"
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1636 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12395
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Hosting a website - basics

Postby HarryPotter » Tue Mar 06, 2012 12:45 pm

DeltaNu1142 wrote:Well, I've yet to see the DSM create a folder called "web"... as I understand it, the "web" folder is created automatically when Web Station is enabled. Well, that doesn't happen for me. I checked the box then rebooted the DS, and still no "web" folder.

Well, then create it yourself :wink:

DeltaNu1142 wrote:Using the "personal website" option, the "home" folder IS automatically created. I then create a subfolder called "www" and put my index.htm file and my missing.htm file into that folder. When I go to http://xxxxxxxx.dyndns.com/~user/ I actually get missing.htm. When I remove missing.htm, I get a Synology page not found error. I've even tried http://xxxxxxxx.dyndns.com/~user/index.htm. I don't understand why index.htm isn't appearing. I have tested both locally in a browser.

Make sure that

- spelling is correct (lower and upper case letters of folder, user- and file names!)
- the index file has valid content

You may also try an index.php or index.html instead of index.htm
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS712+ / DSM 4.2 3211 / 2 x HD204UI (RAID0) / LMS 7.7.2-007
DS110+ / DSM 4.2 3211 / HD154UI
DS408 / DSM 4.0 2228 / 3 x ST31000340AS (RAID0) + 1 x HDS721010KLA330
DS207+ / DSM 3.1.1636 / ST31000340AS + WD5000KS
DS-106x / DSM 4.0 2228 (from DS108j) /

2 Squeezebox 3 + Boom
Rapsody N35

APC Smart UPS SUA750i
User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
 
Posts: 12395
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

Re: Hosting a website - basics

Postby DeltaNu1142 » Tue Mar 06, 2012 12:56 pm

Well... I've disabled personal website, deleted everything, started from scratch & enabled "Web Station". The "web" folder has appeared. I'll give this another shot after my shower...
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Re: Hosting a website - basics

Postby axj » Tue Mar 06, 2012 1:32 pm

I have had 6 DS's (and have 2 now) and I have never needed to create the web-folder myself - it has be done automatic. The 'Personalized website' works fine, but I would like to know, where in the documentation it is mentioned to create the local web-folder named www.
DS509+ 4*1TB Raid+1TB DSM 4.0-2219. Logitech BOOM+Duet 7.6.1, WebCam: Linksys WVC54GCA + TrendNet TV-IP121
DS212+ 1TB & D-Link DIR-685, HP C7280, Dell 3100cn. iPad3, Programming Pascal, Clarion 5.5, html/php. http://axj.dk
User avatar
axj
Specialist
Specialist
 
Posts: 1058
Joined: Fri Jan 02, 2009 10:59 am
Location: Esbjerg, Danmark

Re: Hosting a website - basics

Postby DeltaNu1142 » Tue Mar 06, 2012 2:21 pm

axj wrote:I have had 6 DS's (and have 2 now) and I have never needed to create the web-folder myself - it has be done automatic. The 'Personalized website' works fine, but I would like to know, where in the documentation it is mentioned to create the local web-folder named www.

I quoted that from "DSM Help" above. Apparently, this forum lacks post numbers, but it's the 6th post in this thread.

I'm giving up on an index.* file. I've tried htm, html, php... so, my "default" file will be called missing.htm, which is the only one I've gotten to show up. I can get to that using my dynamic DNS name, so at least that end is working just fine.
DS212j | Win7
DeltaNu1142
Trainee
Trainee
 
Posts: 15
Joined: Thu Mar 01, 2012 8:12 am
Location: Tampa, FL

Next

Return to Web Server + PHP / MySQL

Who is online

Users browsing this forum: No registered users and 2 guests