× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

HOW TO: Hosting multiple websites

WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

Hey,

Great you found a solution.

-Stefan
Message 26 of 130
Sandshark
Sensei

Re: HOW TO: Hosting multiple websites

WhoCares? wrote:
mdgm wrote:
Hopefully a firmware re-install would get the NAS working again.

That's one of the problems because most likely it wouldn't.

-Stefan


I was messing with such things for quite a while before biting the bullet and enabling root SSH. I was using eXplorer and PHP shell. The problem, of course, is that both of those access via Apache, and if you trash Apache, you can't undo them.

Having done so three times before enabling root SSH to give me an option, I can vouch that a reinstall overwrites Virtual.conf and htppd.conf. It does not erase non-default files, though, at least in the primary apache directory. Don't know about in addons.

So if all the changes you make are in the standard files, the worst that a user should have to do is a firmware re-install to undo a mess.
Message 27 of 130
Event_Horizon
Aspirant

Re: HOW TO: Hosting multiple websites

Hi

That is the beauty of my solution. You do not have to enable root SSH access and you don't need to play around with apache or any of the system files so the chances of trashing the system are negligible. It is therefore unlikely that you will need to do a hardware re-install with this solution.

You do not need to create any additional files in the addons directory and the only system file that is changed is Virtual.conf which is changed within frontview.

Cheers

Phil
Message 28 of 130
tjerk1
Aspirant

Re: HOW TO: Hosting multiple websites

Thanks in advance 🙂 It works on my duo, but i got one warning when starting apache-ssl:
[Warn] _default_ VirtualHost on port 80, the first has precedence
I solved it by edit /etc/frontview/apache/httpd.conf and added:
NameVirtualHost *:80
Before the lines:
Include /etc/frontview/apache/Ports.conf
Include /etc/frontview/apache/Virtual.conf
Include /etc/frontview/apache/addons/*.conf
Include /etc/frontview/apache/Shares.conf
Message 29 of 130
Crog
Aspirant

Re: HOW TO: Hosting multiple websites

Hi,

Thanks so much for starting this great forum. I have got a website setup on my new NAS DDO working perfectly now.

One issue I have that is slightly off subject is setting up emails for the domain(s). The NAS obviously does not have any mail server or is there a way to install one? What have you guys done to resolve this issue. I know I can create an MX record for the domain to send the mail to a different mail server but my the mail is rejected as its not for the correct domain! Any help here would be greatly appreciated.
Message 30 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

I'm getting redirected to the Shares site too. I'm setting my hosts file to 192.168.x.x test.nas (which is the servername) but I haven't forwarded the IP address using Port Forwarding. Do I need to do this to get it to work?
Message 31 of 130
mdgm-ntgr
NETGEAR Employee Retired

Re: HOW TO: Hosting multiple websites

Port forwarding is for WAN access (i.e. over the internet).
Message 32 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Ok so I'm using the PHP 1.4 add-on and I can access phpMyAdmin ok as well as static sites. The big problem is .htaccess and mod_rewrite. I get 443 errors.

None of the threads on this forum seem to help and I'm getting a little bit frustrated as I just want a system that works.

Can someone give me a pointer (and some code!) as to what I should do to enable mod_rewrite?

I get the following error.log message -

[Mon Feb 21 09:24:45 2011] [error] [client 192.168.0.192] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /c/sites/mysite/
Message 33 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

Since I don't know how you configured your virtual host, this is just a generic advice. Under the <Directory ....> statement for your master directory (DocumentRoot) add:
Options +FollowSymLinks


-Stefan
Message 34 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Hi Stefan!

Here is an example from my Virtual Host which is in /etc/frontview/apache/addons/my-virtual.conf

<VirtualHost *:80>
ServerName xxx.xxx.dynalias.com
DocumentRoot /c/sites/xxx/
SSLEngine off
RewriteEngine on
DirectoryIndex index.php
Options All
</VirtualHost>
Message 35 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

Ok, so you'd need to add:
<Directory /c/sites/xxx>
Options +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>


Somewhere between <VirtualHost ...> and </VirtualHost>. Don't forget to restart Apache afterwards.

-Stefan
Message 36 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

No dice 😞

Still getting 403 errors. The error log still gives the same error.

Yes I did restart apache!
Message 37 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Any other diagnostics I could run to make sure nothing is conflicting?
Message 38 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

My .htaccess is -

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
Message 39 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

403 means "no access". Or in short: the process apache is running under doesn't have sufficient file system rights to access the data of your vhosts. You can try running
cd /c/sites
chmod -R a+r *


-Stefan
Message 40 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Still not working. Tried it with a static html page. Works fine without .htaccess but I get the 403 if I add the .htaccess.
Message 41 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

What does the error.log of Apache say about this?

-Stefan
Message 42 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

[Mon Feb 21 09:24:45 2011] [error] [client 192.168.0.192] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /c/sites/mysite/
Message 43 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

There's something wrong with your vhost config. To debug this using the forum isn't going to work I think. If you're interested I can have a look using TeamViewer (www.teamviewer.com). Just PM me with the login info if you like.

-Stefan
Message 44 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Thanks Stefan!

I'll let you know when I've got it all set up.
Message 45 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

Don't worry too much. I'm not at all interested in what you're going to serve and if possible I won't even look there 😉

-Stefan
Message 46 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

I trust you 🙂

We need a definitive web hosting server setup guide as opposed to bits and pieces scattered around the forums.

In fact I'm surprised ReadyNas don't ship one as standard like QNAP do. It can always be updated if it doesn't suit.
Message 47 of 130
WhoCares_
Mentor

Re: HOW TO: Hosting multiple websites

Wait for me to finish my add-on 😉

-Stefan
Message 48 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Ooh really? Got an ETA for that? Really need to start developing sites on this box.

PS. PHP 5.3.x would be a bonus!
Message 49 of 130
stinhambo
Aspirant

Re: HOW TO: Hosting multiple websites

Silence... PM me with details?
Message 50 of 130
Top Contributors
Discussion stats
Announcements