Page 1 of 1

Hosting Website on NAS and connecting it to domain

Posted: Fri Jun 26, 2020 6:15 pm
by nafisreza
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 !!!!

Re: Hosting Website on NAS and connecting it to domain

Posted: Fri Jun 26, 2020 9:25 pm
by dolbyman
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

Re: Hosting Website on NAS and connecting it to domain

Posted: Fri Jun 26, 2020 10:15 pm
by nafisreza
please explain

Re: Hosting Website on NAS and connecting it to domain

Posted: Fri Jun 26, 2020 10:15 pm
by dolbyman
what part do you need explaining for ?

Re: Hosting Website on NAS and connecting it to domain

Posted: Fri Jun 26, 2020 10:30 pm
by Moogle Stiltzkin
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.

Re: Hosting Website on NAS and connecting it to domain

Posted: Thu Jul 02, 2020 3:16 am
by jaysona
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.

Re: Hosting Website on NAS and connecting it to domain

Posted: Thu Jul 02, 2020 2:09 pm
by spile
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.

Re: Hosting Website on NAS and connecting it to domain

Posted: Thu Jul 02, 2020 9:04 pm
by jaysona
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.

Re: Hosting Website on NAS and connecting it to domain

Posted: Wed Aug 26, 2020 7:16 pm
by Johnno72
jaysona wrote: Thu Jul 02, 2020 9:04 pm <snip>
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.
And what is this proper configuration of several config files be? Are you able to name said files? Are you able to describe what edits need to be done?

Thanks

Re: Hosting Website on NAS and connecting it to domain

Posted: Wed Aug 26, 2020 10:27 pm
by jaysona
Johnno72 wrote: Wed Aug 26, 2020 7:16 pm And what is this proper configuration of several config files be? Are you able to name said files? Are you able to describe what edits need to be done?

Thanks
Apache config files are located in:
/etc/config/apache and /etc/config/apache/extra

Apache config file is /etc/config/apache/apache.conf The apache.conf file will list the .conf files in /etc/config/apache/extra that will be loaded.

In addition, the /etc/init.d/Qhttp.sh file will need to be tweaked because QNAP - in their retarded wisdom - makes several specific config entries in the apache.conf, apache-ssl.conf and other .conf files via the Qhttpd.sh file. So if you make changes to the .conf file, those changes will be undone when the Qhttpd.sh file is executed.

Another option is to use Qapache instead and completely disable the QNAP default apache server, and configure Qapache to use tcp 80/443 instead.

Re: Hosting Website on NAS and connecting it to domain

Posted: Tue Oct 13, 2020 10:38 am
by mikewong
I got the same error with WordPress page in my Qnap server, where is the configure file path of the Wordpress located? thanks!