Create and Host a website

Questions about hosting a Website, using MySQL, PhP or MariaDB may be posted here.
Forum rules
Synology Community is the new platform for the enthusiasts' interaction, and it will soon be available to replace the Forum.
User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Create and Host a website

Unread post by networkman » Fri Sep 14, 2018 2:51 am

I've been on a mac for quite some time, therefore I'm familiar with iWeb. In the past, I've created a website and it was hosted on MobileMe. But, since Apple turned to iCloud the web feature has gone away. Is there a way I can upload an iWeb site to the NAS? If not, does Synology have an app. I can use to make a website, like iWeb?
Thanks
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

wyodor
Versed
Versed
Posts: 203
Joined: Sat May 11, 2013 1:21 pm

Re: Create and Host a website

Unread post by wyodor » Fri Sep 14, 2018 12:30 pm

You can publish to the NAS with FTP.

The Server address can be the IP number of the NAS or the name of the NAS like diskstation.local

Use the name and password of your NAS account.

If you publish to the web folder use :

Code: Select all

 /web/ 
as the directory path.

If you publish to the www folder of your NAS account, use :

Code: Select all

/home/www/
as the directory path.

If you publlish to the www folder of your NAS account and you have administrator rights, use :

Code: Select all

/homes/your_username/www/
as the directory path.

The above assumes you use iWeb 3.0.4.
Previous iWeb versions can only publish to a folder. In that case, mount the NAS on the Desktop and publish to the www or web folder directly.

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Fri Sep 14, 2018 3:43 pm

Wyodar,
Thanks for the response. When testing the connection, it said Logging in, then connection failed. I've attached the pic, asking the questions in the placement of what to type in. Are these the correct answers I'm inputing? Image
Should I be doing additional work? I tried publishing the site to Local Folder (the NAS web folder) and it opened.
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

wyodor
Versed
Versed
Posts: 203
Joined: Sat May 11, 2013 1:21 pm

Re: Create and Host a website

Unread post by wyodor » Fri Sep 14, 2018 4:05 pm

If your Mac is on the same local network (LAN)as your NAS then there's no need for DDNS, WAN-IP or domainname.

Unless you publish from a remote computer. Then you have to open port 21 in the router and forward the port to the NAS.

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Fri Sep 14, 2018 5:41 pm

If your Mac is on the same local network (LAN)as your NAS then there's no need for DDNS, WAN-IP or domainname.
My Mac is on the same LAN as my NAS.
Having nothing in the server address, during the test connection, gives an instant-Failed. Please enter an FTP server address in Site Publishing Settings, and then try again.
I tried my static IP that I used when setting up the NAS. Failed.
I then tried the static IP with the underlined parts added https://xxx.xxx.xxx.xxx:5001 it said logging in, Failed.
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

wyodor
Versed
Versed
Posts: 203
Joined: Sat May 11, 2013 1:21 pm

Re: Create and Host a website

Unread post by wyodor » Fri Sep 14, 2018 6:02 pm

Having nothing in the server address, during the test connection, gives an instant-Failed
Yes, it requires a valid address. Shouldn't surprise you.
That's the URL to connect to DSM in the browser. It's not a FTP address.

Did you enable FTP in the NAS?

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Fri Sep 14, 2018 9:28 pm

Did you enable FTP in the NAS?
Under Control Panel>FTP, I now checked Enable FTP Service.
Here's the pic for setting up port forwarding on my router. I've read the IP address should be ftp://ipaddress
What should I type in these spots?
Image
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

User avatar
akahan
Navigator
Navigator
Posts: 992
Joined: Sat Jul 14, 2012 6:52 pm

Re: Create and Host a website

Unread post by akahan » Sat Sep 15, 2018 6:41 am

You are transferring files from your Mac to the NAS.
They are on the same LAN.
Port forwarding only affects packets coming from the WAN (internet) to your LAN.
Port forwarding on your router is totally irrelevant for this purpose, since your Mac is on the same network as your NAS.

You would, on the Mac, enter the LAN IP address of the NAS. Not the domain name. Not a DDNS name. Not the WAN address of your network. The *LAN IP* address.
DS214play, DS216play, DS216, DS212J, DS414, DS816, rt2600ac

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Sat Sep 15, 2018 2:57 pm

You would, on the Mac, enter the LAN IP address of the NAS. Not the domain name. Not a DDNS name. Not the WAN address of your network. The *LAN IP* address.
Akahan, Thanks
Is the IP address the number you see if you go to google and search "what's my ip." I ask this because it states the number and "your public IP address"
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

wyodor
Versed
Versed
Posts: 203
Joined: Sat May 11, 2013 1:21 pm

Re: Create and Host a website

Unread post by wyodor » Sat Sep 15, 2018 3:38 pm

Forget your router and focus on the problem :

Publish a website with iWeb on your Mac to your NAS.

Read my first post again.

All the ingredients how to do that are there.

The serveradress, the username and password, and the path.

You may also want to enter a Website URL in the empty field.

User avatar
akahan
Navigator
Navigator
Posts: 992
Joined: Sat Jul 14, 2012 6:52 pm

Re: Create and Host a website

Unread post by akahan » Sat Sep 15, 2018 4:01 pm

No. It’s the NAS’s numeric IP address on your local network.
Your WAN address is your address on the internet.

It’s either selected by you in the network setup area of the NAS, or assigned to the NAS by the router using DHCP.

It would be best if you set up address reservation in the router so that it consistently assigned the same LAN address to the NAS every time. Otherwise, its address is likely to change each time you reboot the router.
DS214play, DS216play, DS216, DS212J, DS414, DS816, rt2600ac

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Sat Sep 15, 2018 11:43 pm

It’s the NAS’s numeric IP address on your local network.
I tried typing that in. When setting up the NAS, it's setup as a static IP 192.168.0.xxx
It said, "Failed"
Read my first post again.

All the ingredients how to do that are there.

The server address, the username and password, and the path.

You may also want to enter a Website URL in the empty field.
This might not be working because I haven't activated a website URL.
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

User avatar
akahan
Navigator
Navigator
Posts: 992
Joined: Sat Jul 14, 2012 6:52 pm

Re: Create and Host a website

Unread post by akahan » Sun Sep 16, 2018 12:36 am

I"m assuming you're still trying to publish your site to the NAS, and not yet trying to access the website itself.

If so, just make sure you haven't skipped a step.

Figure out which user you'll be logging into the NAS as to publish the files.
Go to Control Panel / File Services / FTP, and enable FTP. Take note of the port number; it's probably 21.
Go to Control Panel / Privileges, and choose FTP. Click edit, and make sure the user you're going to log into the NAS as has "Allow" checked.
Go to Publishing on your PC, and to FTP server settings.
Set the server address as 192.168.0.XXX, whatever the NAS's LAN IP address is.
Choose the user name for the user you selected and enabled above.
Enter that user's NAS password.
Pick a directory path for the files to be loaded into. It would NOT be /web/, but you could use web/ There should NOT be a leading slash.
Make sure protocol is FTP, and the port matches the one you took note of above (probably 21).
Hit Test Connection and see if it works.
If it doesn't, log into the NAS and make sure there's a folder called "web" in that user's home directory.
DS214play, DS216play, DS216, DS212J, DS414, DS816, rt2600ac

User avatar
networkman
Rookie
Rookie
Posts: 38
Joined: Sat Aug 18, 2018 10:29 pm

Re: Create and Host a website

Unread post by networkman » Sun Sep 16, 2018 3:37 pm

Figure out which user you'll be logging into the NAS as to publish the files.
Go to Control Panel / File Services / FTP, and enable FTP. Take note of the port number; it's probably 21.
Go to Control Panel / Privileges, and choose FTP. Click edit, and make sure the user you're going to log into the NAS as has "Allow" checked.
Go to Publishing on your PC, and to FTP server settings.
Set the server address as 192.168.0.XXX, whatever the NAS's LAN IP address is.
Choose the user name for the user you selected and enabled above.
Enter that user's NAS password.
Pick a directory path for the files to be loaded into. It would NOT be /web/, but you could use web/ There should NOT be a leading slash.
Make sure protocol is FTP, and the port matches the one you took note of above (probably 21).
Hit Test Connection and see if it works.
Akahan,
Awesome! We have success.
Thank you.
Image
After I purchase a URL, do I just enter the website URL in the iWeb FTP, then people can connect to the URL from outside of my network. I'm just wanting to be able to host my website, after it's created.
networkman
DS 218+
DSM 6.2-23739 Update 2
(2) WD NAS Red 2TB HDD
RAID Type: 1
Hibernation time: 20 mins

User avatar
akahan
Navigator
Navigator
Posts: 992
Joined: Sat Jul 14, 2012 6:52 pm

Re: Create and Host a website

Unread post by akahan » Sun Sep 16, 2018 3:55 pm

You don't purchase a URL.
You purchase a domain name.

Then, you need to make sure that the domain name points to your WAN IP address (the address assigned by your ISP).

(In other words, arrange that when people type www.yourdomain.com into their browser, and their browser contacts a DNS server somewhere on the internet to ask "what IP address to I go to if I'm looking for www.yourdomain.com?", it gets the right answer from that server.)

For most residential service, your WAN IP address will change from time to time, so you will need to work with a DDNS service to keep the correspondence between the WAN IP address and your purchased domain name up to date. A DDNS service just accepts regularly-sent packets from a DDNS client on your network (it can be your router, or a Diskstation) that say "my domain name is X" and checks to see what IP address they're coming from; if the IP address has changed, then the service updates the world's DNS servers with the new IP address.

Once you've taken care of all THAT, then someone out on the internet can go to www.yourdomain.com and, if you have configured your router to forward port 80 to the LAN address of your diskstation, they will reach the web site hosted on your diskstation, provided you have activated web server on the diskstation and configured it correctly.

Activating web server will create a shared folder in the root of the user area of the Diskstation called www. At that point, you'll want to move the files comprising the site into that folder.

Until you have gotten DDNS and your domain name working, you can still test the functionality of your website and its accessibility from the internet by browsing to http://your-numeric-wan-ip.address:80 from a machine outside your network.
DS214play, DS216play, DS216, DS212J, DS414, DS816, rt2600ac

Post Reply

Return to “Web Server + PHP / MySQL + MariaDB”