Hosting Website on NAS and connecting it to domain

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
nafisreza
New here
Posts: 2
Joined: Fri Jun 26, 2020 6:10 pm

Hosting Website on NAS and connecting it to domain

Post by nafisreza » Fri Jun 26, 2020 6:15 pm

I have hosted a WORDPRESS website on my QNAP NAS. I was able to access it with the IP of NAS. Today I have purchased a domain. Now please tell me how do I connect the domain with my wordpress site hosted on NAS. I have created a virtual host. Now the site is being loaded, but only HTML files are loading. Other things are not there. Moreover, I cant even login to the dashboard of WORDPRESS. It gives me this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@NAS to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

NOW I DONT KNOW WHAT TO DO. PLEASE HELP !!!!

dolbyman
Guru
Posts: 19162
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Hosting Website on NAS and connecting it to domain

Post by dolbyman » Fri Jun 26, 2020 9:25 pm

best to get a cheap webspace and host it there

qnap webserver is running with root privileges, so if somone hacks your website, they can gain full access to all your nas files (erase or hold them hostage)

never expose your nas to the web

nafisreza
New here
Posts: 2
Joined: Fri Jun 26, 2020 6:10 pm

Re: Hosting Website on NAS and connecting it to domain

Post by nafisreza » Fri Jun 26, 2020 10:15 pm

please explain

dolbyman
Guru
Posts: 19162
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Hosting Website on NAS and connecting it to domain

Post by dolbyman » Fri Jun 26, 2020 10:15 pm

what part do you need explaining for ?

User avatar
Moogle Stiltzkin
Ask me anything
Posts: 9035
Joined: Thu Dec 04, 2008 12:21 am
Location: Around the world....
Contact:

Re: Hosting Website on NAS and connecting it to domain

Post by Moogle Stiltzkin » Fri Jun 26, 2020 10:30 pm

i recommend blue host, if your purpose is making a website
https://hostingfacts.com/hosting-reviews/bluehost/

Bluehost Review 2020 - Is Bluehost The Best Option In 2020? Honest Look
https://www.youtube.com/watch?v=jeFSRFmhSMk


may be worth going for the plus plan since it's unmetered storage space and bandwidth
Image


and if your site gets hacked, you can wipe it, then restore using backups hosted on your nas (which ideally should not be exposed to the web).

So then your important data on the QNAP NAS is safe away from the internet, and you can have your website online hosted on a hosting server kept separate.
NAS
[Main Server] QNAP TS-877 w. 4tb [ 3x HGST Deskstar NAS (HDN724040ALE640) & 1x WD RED NAS ] EXT4 Raid5 & 2 x m.2 SATA Samsung 850 Evo raid1 +16gb ddr4 Crucial+ QWA-AC2600 wireless+QXP PCIE
[Backup] QNAP TS-653A w. 5x 2TB Samsung F3 (HD203WI) EXT4 Raid5
[Backup] QNAP TL-D400S 2x 4TB WD Red Nas (WD40EFRX) single disks.
[^] QNAP TS-659 Pro II
[^] QNAP TS-509 Pro w. 4x 1TB WD RE3 (WD1002FBYS) EXT4 Raid5
[^] QNAP TS-228
[^] QNAP TS-128
[Mobile NAS] TBS-453DX w. 2x Crucial MX500 500gb EXT4 raid1

Network
Asus AC68U Router|100dl/50ul MBPS FTTH Internet | Win10, WC PC-Intel i7 920 Ivy bridge desktop (1x 512gb Samsung 850 Pro SSD + 1x 4tb HGST Ultrastar 7K4000)


Guides & articles
[Review] Moogle's QNAP experience
[Review] Moogle's TS-877 review
https://www.patreon.com/mooglestiltzkin

User avatar
jaysona
Know my way around
Posts: 198
Joined: Tue Dec 02, 2008 11:26 am

Re: Hosting Website on NAS and connecting it to domain

Post by jaysona » Thu Jul 02, 2020 3:16 am

dolbyman wrote:
Fri Jun 26, 2020 9:25 pm
best to get a cheap webspace and host it there

qnap webserver is running with root privileges, so if somone hacks your website, they can gain full access to all your nas files (erase or hold them hostage)

never expose your nas to the web
nafisreza wrote:
Fri Jun 26, 2020 10:15 pm
please explain
Hosting a wordpress website on a QNAP NAS securely requires the modification of several configuration files, such as the apache config files, php environment and config files, wordpress config files, etc.

So, given that you are asking for help with very basic web-server and wordpress configuration indicates that you are probably better off using an inexpensive wordpress hosting service. You can host the wordpress site on your NAS is you want, but be aware that unless it is properly configured and secured, the wordpress site will eventually get hacked.

Wordpress sites are hacked every day, keeping a wordpress site secure requires constant attention, and that attention is best left to be handled by a wordpress hosting service. As with all services, there are some that are better than others.
H/W: TS-219 Pro / TS-269 Pro / TS-253 Pro (8Gig)
H/W: TS-509 Pro x2 / TS-569 Pro / TS-670 Pro (i7-3770S 16Gig) x2 / TS-853 Pro (8Gig)
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 384.18
Router2: Asus RT-AC68U - DD-WRT v3.0-r39960M kongac
Router3: Linksys WRT1900AC - DD-WRT v3.0-r43028 std
Router4: Asus RT-AC66U - FreshTomato v2020.3
Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)

spile
Know my way around
Posts: 134
Joined: Tue May 24, 2016 12:13 am

Re: Hosting Website on NAS and connecting it to domain

Post by spile » Thu Jul 02, 2020 2:09 pm

On the other hand others make a case for for self hosting
https://mariushosting.com/pay-for-web-h ... ology-nas/
I use a web host but others like those above demonstrate that many issues are less black and white and more shades of grey.

User avatar
jaysona
Know my way around
Posts: 198
Joined: Tue Dec 02, 2008 11:26 am

Re: Hosting Website on NAS and connecting it to domain

Post by jaysona » Thu Jul 02, 2020 9:04 pm

spile wrote:
Thu Jul 02, 2020 2:09 pm
On the other hand others make a case for for self hosting
https://mariushosting.com/pay-for-web-h ... ology-nas/
I use a web host but others like those above demonstrate that many issues are less black and white and more shades of grey.
That's a somewhat mis-leading (or rather incomplete) blog imnsho.

I also host a plethora of services on my NAS (web, email, dns, xmpp/omemo, to name a few), however there needs to be some clarifications in reagrds to the post.

What is not mentioned in the blog is that the Synology NAS administration web services have their own set of security vulnerabilities which have been actively exploited as well. Regardless of which NAS platform is used for home hosting, the http, php, sql, etc services need to be properly configured and secured - another mention that is missing from the blog post.

The upside to (some) paid hosting services, is that the apache (typically used), php and sql configs tend to be better configured than the default configs deployed on QNAP and Synology NAS units, for example. Sure the sites may work just fine, but how secure are the apache, PHP and sql configs?

Most exploits do not go after the web server itself, but rather poorly configured PHP and sql which are served by the apache web server. Once a PHP or sql vulnerability is exploited (usually a series and vulnerabilities need to be exploited in a particular order) then the privilege escalation can begin with the goal of owning the NAS. This type of hack is equally applicable to any NAS unit since most are packaged with confgs to make the web site work vs work securely.

It is quite possible to host a relatively secure web site on NAS, but to do so requires fore-thought, planning and the proper configuration of several config files. I am not saying do not host a website on a NAS, but if it is going to be done, it should be done properly.
H/W: TS-219 Pro / TS-269 Pro / TS-253 Pro (8Gig)
H/W: TS-509 Pro x2 / TS-569 Pro / TS-670 Pro (i7-3770S 16Gig) x2 / TS-853 Pro (8Gig)
O/S: Slackware 14.2 / MS Windows 7-64 (x5)
Router1: Asus RT-AC86U - Asuswrt-Merlin - 384.18
Router2: Asus RT-AC68U - DD-WRT v3.0-r39960M kongac
Router3: Linksys WRT1900AC - DD-WRT v3.0-r43028 std
Router4: Asus RT-AC66U - FreshTomato v2020.3
Misc: Popcorn Hour A-110/WN-100, Pinnacle Show Center 250HD, Roku SoundBridge Radio (all retired)

Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”