Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 06:36PM

Hi all,

In order to meet a deadline I shall not sleep tonight and work on setting up a server that is capable of receiving files from an external computer. Details are as follows:

WAMP 2.0i
Windows 7 Ultimate 32-bit
2GB DDR-800
Pentium 4 3.2GHz
500GB 7200RPM SATA drive
Wired ethernet to router
16MBps broadband internet
Static IP

Requirements:
-Able to be accessed from the Internet
-Able to receive file uploads from an external source
-Able to retrieve said uploads in server computer
-Simple authentication would be nice but not strictly neccesary

So far I have completed the following:
-Installed WampServer
-Created directories
-Modified configuration files in Sys32 and Apache folders as per JLBN guide here:
[guides.jlbn.net]
-Able to access from within intranet with address "[sub2]; etc.
-Stuck on step five of guide, unable to access from outside router with IP address
Have followed instructions very carefully and checked multiple times but cannot figure it out.

Please help, this is an urgent matter.

Regards,
Nicholas.



Edited 1 time(s). Last edit at 09/20/2010 06:38PM by nicky9499.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 07:46PM

Please, I am desperate and I need help. As long as the server cannot connect to the internet I cannot proceed to implement the PHP scripts for uploading and authentication. Even so, I will need large amounts of time to figure these out and thoroughly test them. Browsing other threads of similar issue has not proven to be useful.

Best regards,
Nicholas.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 20, 2010 10:28PM

You need to setup access

To setup Access, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 10:40PM

Thanks so much for helping. Problem is at stage 9 of Virtual Host setup guide it says:

On computers outside your LAN, access your websites as follows:

If using Web IP:
[123.345.567.789] (to access domain.com)
[123.345.567.789] (to access sub1.domain.com)
[123.345.567.789] (to access sub2.domain.com)

However I cannot access my pages. Even on iPhone using 3G internet (external origin), I only get "could not open the page because the server stopped responding" error. Is this supposed to happen? I have followed the guide extremely precisely and substituted all the example addresses for those in my IPconfig.exe and external IP address.

Please help.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 10:53PM

Even after setting up Access through port forwarding, I am still unable to access any of the pages from WAN IP. In LAN I can only access the first folder in httpd-vhosts.conf and none of the others, all display unable to load error. Have set up Belkin router in Virtual Server section ;

Description: HTTP
Inbound port: 80
Type: TCP and UDP
Private IP address: 192.168.1.6
Private port: 80

Used uTorrent port tester to check port 80 and it is not being blocked. What can be the problem here? It is already 4:53am and I need to leave the house by 6:30am. Please need help very urgently.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 20, 2010 10:57PM

it's 3 things in that Access guide and you need all 3 winking smiley

if already setup all 3 and still have problem, then your router does NOT support NAT loop back and you need to actually access from outside LAN; if using cellphone, then use mobile wireless but dont use wifi since it's still inside your LAN winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 2 time(s). Last edit at 09/20/2010 11:06PM by yfastud.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 11:15PM

That is the problem. I cannot access from outside the LAN but within all the pages show up fine. I tried browsing with 3G (mobile) internet to test from outside and also failed to load the page. Where could there possibly be an error? I don't even know where to start looking..

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 20, 2010 11:16PM

DID you setup ALL 3 things in Access guide???

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 11:25PM

Okay. Now entered WAN IP the first folder shows up but cannot navigate to other folders for example [218.186.185.156] the browser will give error page cannot be found.

Now applied proxy and entered WAN IP again and this time could not load anything at all again.

Please help, many thanks.

Edit:
Yes, I did not set ports through firewall, i completely disabled firewall. Port forwarding done as described above, also tested for port 80 throughput.



Edited 1 time(s). Last edit at 09/20/2010 11:28PM by nicky9499.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 20, 2010 11:43PM

Just realized WAN IP that router reports and hereismyip.com are different. The first one if i enter into browser I am able to load first page but not if on a proxy. The second one completely doesn't load. What's going on? Have less than an hour and upload script is still in a mess. If somebody could help with simple PHP script at the same time I would be eternally grateful. Here it is:


// Where the file is going to be placed
$target_path = "uploads/";

/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error. Please contact the adminstrator or try again.";
}


and html file inside the same folder:

<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="104,857,600" />
Browse for archive: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Submit" />
</form><

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 21, 2010 05:11AM

for basic, script looks ok, now put those 2 and create htaccess for authentication

to setup htaccess, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 21, 2010 11:50AM

I understand the setting of login username and password using htaccess, but the fundamental problem here is still the server cannot be reached from outside LAN. Instead of posting guide after guide (which I know of and have read) it would be more useful and productive to try to find what is preventing my server from connecting to the Internet.

Best regards,
Nicholas.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 21, 2010 03:24PM

put it this way, guides give you basic ideas but millions wamp users have millions different things so you base on basic ideas in guide to setup yours; anyway, will post details of all needs when have time winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 21, 2010 03:37PM

Okay, but hope is soon because I don't have much time left.


Best regards,
Nicholas.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 21, 2010 05:49PM

Hi, are you still working on the issue?

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 21, 2010 06:18PM

Assume you already follow all steps in Access guide, ie. added exception for wamp and port 80 and 3306 in all routers and firewalls/antivirus, enable Online mode

// file httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
ServerName domain
// Uncomment this line if have real domain and already setup DNS
//ServerAlias domain.com www.domain.com
DocumentRoot C:/wamp/www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
</VirtualHost>
# file hosts
127.0.0.1 localhost
127.0.0.1 domain
Assume your router has LAN IP 192.168.0.1, your computer with WAMP installed has LAN IP 192.168.0.100 and your WAN IP is 123.345.567.789, ie in your case is 218.186.185.156; basically, you need to enable port on router as follows:

Service name: HTTP
Start port: 80
End port: 80
Server IP address: 192.168.0.100

No matter inside or ouside LAN, with these setup, you must see contain of folder domain when use these URL
// Inside LAN
[domain]

// Outside LAN
[123.345.567.789]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 21, 2010 08:55PM

Okay. Here is the situation right now.

I am sick of dealing with port issues, so the entire computer I've moved outside the router's DMZ.
I have a dynamic DNS address (nicky9499.dyndns.org) that is associated with my WAN IP (218.186.185.156).

At 218.186.185.156 is Apache, in other words the content inside the www folder (let's call it test1.htm.
Within my LAN, if I enter nicky9499.dyndns.org I will successfully get test1.htm.

SO, this means that connection within LAN is working. Firewall has been turned off and server computer is in DMZ so it is using same WAN IP as router, no need for port forwarding.

HOWEVER, if I test by trying to access nicky9499.dyndns.org or 218.186.185.156 FROM OUTSIDE LAN (using another com or mobile 3G internet), I am unable to connect. Receive 504 error: general SOCKS failure.


What else could be the problem?
Please reply quick I have been working on this all night and have not slept for the past 50 hours.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 22, 2010 02:20AM

1. make sure your isp does not block common ports such as 80...
2. must have forward
3. w/ dyndns, did you setup dns or forward?

solutions
1. if possible, change isp instead port
2. use either router or pc for forwarding
3. setup dns and avoid forwarding service at all cost

btw, if your goal is file server, you should setup Ubuntu and Samba to have a nice file server which uses very low resources and can be accessed on all *nix and win units; just make sure to use Ubuntu Server version, not desktop version, which already have LAMP and just simply enable Desktop GUI if not comfortable w/ command line winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides



Edited 2 time(s). Last edit at 09/22/2010 02:24PM by yfastud.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: nicky9499 (---.218.186.10.236.maxonline.com.sg)
Date: September 23, 2010 12:30AM

1. Change ISP means hefty termination cost, and current ISP serves me very well in terms of speed and reliability.
2. Already stated server computer has been moved to router's DMZ, means IT IS OUTSIDE THE NETWORK, using the WAN IP (same as router). No need for forwarding.
3. Already stated as well, Dynamic DNS is in use.

Regards,
Nicholas.

Options: ReplyQuote
Re: Help: setting up file server
Posted by: yfastud (Moderator)
Date: September 23, 2010 04:49AM

Quote

1. Change ISP means hefty termination cost, and current ISP serves me very well in terms of speed and reliability.
that's why they have saying "you can NOT eat a cookie and HAVE it the same time"; to me, I need a server and I rather change ISP
Quote

2. Already stated server computer has been moved to router's DMZ, means IT IS OUTSIDE THE NETWORK, using the WAN IP (same as router). No need for forwarding.
when 1 in effect, 2 wont work
Quote

3. Already stated as well, Dynamic DNS is in use.
hope you dont mind to post 3 main steps to setup DNS here

anyway, you can try to change port in file httpd.conf, so open it and find
listen 80
and change to
listen 8181
restart wamp to take effect and try 'http://url:8181'
if work, then from now on you always have to attack port to url and pretty much can NOT use this pc for anything else such as ftp server, media server...

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.