[TUTORIAL] How to config your webserver first time

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Fri May 15, 2009 4:05 pm

Hello

I have almost the same as you, but i have my Qnas on the wan side of the wireless router.

Connected like this.

Broadband router = IP 10.0.0.1 Here I have 12 port switch
Qnas 1 = IP 10.0.0.50 connected to switch
Qnas 2 = IP 10.0.0.51 connected to switch

Dlink Wireless = connected to switch

Inside of this I have my computers in IP range the same as you 192.1.0.1 - 255

This also works fine with Telenor.
And I have only to open the Nat in my Broadband router.


The tricky thing here is when you want to access the Qnas with Qfinder.
This is not often but then I connect my Laptop to the Switch, and then I have the new IP range 10.0.0.1-255.

If there are 4 port switch on your broadband router, I would have tried this.
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby CasperS » Fri May 15, 2009 9:39 pm

aha, so you think that i need to put a switch between the 2 routers?

If that is the way to go, i need to reconfig the whole network, cause, i use the nat dhcp on my dlink router.

Or don't you think it's a problem?
CasperS
New here
 
Posts: 4
Joined: Fri Mar 20, 2009 3:07 am
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Fri May 15, 2009 10:40 pm

I sholul not be any problems for yoy.

I sit inside my lan with ip adresses 192.1.1.***

My default gareway is 10.0.0.1
This I got from my DHCP server inside the Wireless router

If there is a broadband router with 4 lan ports, you can try this.

Set the Ip adress inside the Qnas to a adress like your lan behind the Broadband router.

Set the default gateway to your broadband router.

Set the default gateway in your wireless router to the broadbands IP

Open the port 80 from outside to your Qnas new ip adress port 80
If you need port 8080 and 21 you do the same with them.

The rest of your network should you let stay like it is.

What is your broadbands IP adress. If this is 192.1.0.1 You use this as default gateway in the Qnas and Wireless router.

If it dont work, you can always put it back to the old config.
But I had everything behind the wireless router before, and because of the speed and some other things I change it.

Dette fikser du. Dersom du trenger bedre forklaring på Norsk/dansk send meg en PM
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby Frankie » Sun May 17, 2009 1:50 pm

I'm looking for info on howto change the apache root from /Qweb to the Qweb/Joomla root, as a lot of users may be using Joomal off the bat it might be a good idea to add details on howto do this to the tutorial.. ;)

Just a thought.. ;)
Frankie
Starting out
 
Posts: 32
Joined: Fri May 08, 2009 8:48 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Sun May 17, 2009 2:13 pm

Hello

If you want to change your documentroot to /joomla
Pleace search for Frisbe s answeres about virtual Host and customized.conf.
Or look at my answere in this treaht viewtopic.php?t=13928&p=65201#p65201

The easyest way to do this changes is here

Create one file with a nice name. I use Customized.conf
Dont use Notepad. Use Dreamviewer, or WInscp or something
Save this some easy place to reach.
I use share/Qweb

Add this line to apache.conf= include /share/Qweb/customized.conf

In the customized conf you put your virtual host lines
Like this

<VirtualHost *:80>
ServerName myjomladomain.dyndns.info
DocumentRoot "/share/Qweb/joomla"
</VirtualHost>


If you want to add more virtual host to have more homepages in your Qnas
then add next virtual host to customized.conf.

<VirtualHost *:80>
ServerName yourseconddomain.dyndns.info
DocumentRoot "/share/Qweb/yourseconddomain"
</VirtualHost>

This is an example of customized.conf includ 10-15 domains
Every line started with # is not running. I have added them only to rember the lines i need when restarting the apacheserver
Then I can just copy the line in to WINscp terminalwindow and press run.

If you whant to pause some domain, you can put # before your lines, and the apache server dont run it.

my customized conf.zip


Then create a folder named yourseconddomain under Qweb.

To restart your Apache server just start WinSCP
and the terminal window - Or use putty

Here are the command you run inside of the terminal window to restart your apache server
/etc/init.d/./Qthttpd.sh restart


Now you have to domains.

I run around 12 domains on my Qnas, and there are no problems.
You do not have the required permissions to view the files attached to this post.
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby Frankie » Mon May 18, 2009 1:33 am

ok, thanks for the help. I now have it working. I had to add the following also or the server IP was directing me straight to the Joomla dir, and shortcuts to the Xdove configutation from the QNAP config page weren't working, is there any way round that?..

NameVirtualHost *:80

<VirtualHost *:80>
ServerName siamsec.dnsalias.com
DocumentRoot "/share/Qweb/Joomla/"
</VirtualHost>

<VirtualHost *:80>
ServerName 192.168.1.34
DocumentRoot "/share/Qweb/"
</VirtualHost>
Frankie
Starting out
 
Posts: 32
Joined: Fri May 08, 2009 8:48 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Mon May 18, 2009 1:40 am

This is the problem if you use Joomla as documet root for your dyndns adress, and you have only one adress.
If you want to connect to PHPMyAdmin or something later it will be difficult.

The best thing is to have One DynDNS adress to the Qweb folder.

If you want to have your root directory redirected, you can create one index.php in the Qweb folder
Inside of this you have this lines
Edit your adress
Code: Select all
<?php
header("Location: http://mypage.com/joomla"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>


Rename the index file from Qnap in the rootfolder to somthing like indexold.html
Then everyone that visits your webadress will be redirected to Joomla directory.
And you are still able to use your http://mypage.com/phpMyAdmin
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby Frankie » Mon May 18, 2009 2:57 pm

ok, so a dnsalias wildcard would work?

something like.. qnap.mydomain.dnsalias.com

<VirtualHost *:80>
ServerName qnap.mydomain.dnsalias.com
DocumentRoot "/share/Qweb/"
</VirtualHost>

Then I would log in remotely using?

qnap.mydomain.dnsalias.com/xdove
qnap.mydomain.dnsalias.com/PHPMyAdmin
etc.....

Thanks for the help.
Frankie
Starting out
 
Posts: 32
Joined: Fri May 08, 2009 8:48 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Mon May 18, 2009 4:47 pm

Frankie wrote:ok, so a dnsalias wildcard would work?

something like.. qnap.mydomain.dnsalias.com

<VirtualHost *:80>
ServerName qnap.mydomain.dnsalias.com
DocumentRoot "/share/Qweb/"
</VirtualHost>

Then I would log in remotely using?

qnap.mydomain.dnsalias.com/xdove
qnap.mydomain.dnsalias.com/PHPMyAdmin
etc.....

Thanks for the help.



Yes this will work fine.

One problem I have with wildcards is...

If I close down the Qnas, and start it again.
The wildcards dont work. Then I have to go to dyndns.com and update use wildcards.
I dont know why, and I just fix it every time.
I have many wildcards domain, and it takes around 1 hour before all of them is up and running again.
This I think is because the DNS servers around need update. (I dont know the answere, but only think this)
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby Frankie » Mon May 18, 2009 8:29 pm

I'll try that and let u know how I get on.

Another problem...

I have no installed a rockettheme rocketlauncher in place of the default joomla files.

BUT I have to change the joomla directory's configuration.php permissions to 777 to allow the joomla global configuration to write to it. I've read that leaving the permissions as 777 is a bad idea. How did the default joomla install deal with this as I was able to alter the joomla global configuration without changing any permissions, was it set to 777 by default?
Frankie
Starting out
 
Posts: 32
Joined: Fri May 08, 2009 8:48 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Mon May 18, 2009 10:11 pm

Hello

I checked my files with WINscp inside the Joomla folders and they are 766
Folders are 777
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby stephenpini » Wed Jun 10, 2009 12:02 am

I am trying to set up my website on my QNAP 209 II Pro.

I have access to my NAS outside of my LAN through dyndns.

I own a domain and I would like to host it on my QANP.

How do I do this?

I have tried all the tutorials but it does not actually give a step by step guide on how to setup the NAS for a website, just for webhosting.

ANY HELP WOULD HELP! THANKS!
stephenpini
Starting out
 
Posts: 10
Joined: Sat Jun 06, 2009 1:42 am
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby jm45 » Wed Jun 10, 2009 12:53 am

Hi stephenpini,
You have just to enable the "Web Server" Service
and copy your files in the root of the Qweb folder.

btw, you should update your firmware, 2.1.0 0904T is a bit old and needs some changes in apache.conf

no changes are needed in the last releases:
last Official is Firmware v2.1.4 Build0318
and last beta (working very very fine) is v3.0.0 Build0430
Last edited by jm45 on Wed Jun 10, 2009 3:00 am, edited 1 time in total.
TS-109 II firmware version: 3.1.0 Build 0708T (1TB disk)
jm45
Easy as a breeze
 
Posts: 411
Joined: Tue Oct 07, 2008 6:30 pm
NAS Model: TS-109/209 Pro II

Re: [TUTORIAL] How to config your webserver first time

Postby thorejoha » Wed Jun 10, 2009 2:48 am

Hello

Dyndns is for dynamic ip adress. If you have your own domain, you may also have a static ipadress.
If not, you have to get one. Ask your broadband provider how to get this.
Then you can setup the DNS to this adress in your controllpanel from your domain provider.


Maybe someone now any other way to this. But i think this is the right way to go.
My Tutorials:
Tutorial:How to config webserver on Qnas!
Tutorial:How to use loginscript and Robocopy
Tutorial:How to set up DynDNS on Qnas!
Tutorial:How to move large files on Qnas!
Tutorial:How to edit apache.conf on Qnas!
Tutorial:How to seed files and folders in Qget
Tutorial:How to fix slow wordpress on Qnas!

See also Don`s How To guide!
And Frisbe`s signatur for more Tips and Tricks!
_______________________________________
NAS nr 1: TS-109 Pro FW: 3.1.0 Build 0708T - 1 x Seagate 500Gb + 1X USB 500GB Qraid
NAS nr 2: TS-109 Pro II FW: 3.1.0 Build 0708T - 1 x Western Digital 1Tb
____________________________________________________________________________
User avatar
thorejoha
Know my way around
 
Posts: 144
Joined: Mon Mar 24, 2008 9:41 pm
NAS Model: TS-109/209 Pro

Re: [TUTORIAL] How to config your webserver first time

Postby stephenpini » Wed Jun 10, 2009 4:14 am

Well, I own www.braia.co.uk. So what I would like is that when people type this in there web browser it goes to a website that is hosted on my QNAP. Is that possible?
stephenpini
Starting out
 
Posts: 10
Joined: Sat Jun 06, 2009 1:42 am
NAS Model: TS-109/209 Pro

PreviousNext

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

Who is online

Users browsing this forum: No registered users and 2 guests