LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-10-2015, 03:08 AM   #1
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Rep: Reputation: Disabled
Unhappy Not found 404 Error with Redhat No-Ip


Hello there,
Im running redhat server and currently installed no-ip client so that i could expos my pc to internet,and im running a tomcat server and hosting a webpage, firstly i was running ubuntu and windows with no-ip it was no issue, when i type the noip id followed with the dir like sample.hopto.org:8080/mypage it loads the page, but in linux it says 404 not found, do u have any possible solution to it. Thanks in Advance
 
Old 03-10-2015, 08:47 AM   #2
manoj_hanse
Member
 
Registered: Mar 2008
Posts: 48

Rep: Reputation: 1
hi,

please check:

1. apache service is running (i.e.: httpd)
2. dont use 8080, just give the website name/path.
3. check if website domain name is pingable ie. it has a ip-address in /etc/hosts file.(e.d: ping sample.hopto.org)
4. check if it had read permissions for all users for path file. (ls -l path/filename ).
5. check if port 80 or 8080 is open for httpd, if not open or add entry to firewall.

let us know if it works.
 
Old 03-10-2015, 08:57 AM   #3
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
when i type without port number it says
Not Found

The requested URL /mypage was not found on this server.
Apache/2.2.15 (Red Hat) Server at sample.hopto.org Port 8080

when i type with it gives out 404 Not Found.

BTW how to give hosts name in /etc/hostname i gave
192.168.1.99 sample.hopto.org----> is this right

and i use portchecker to see through 80 and 8080, there is no block

and

ls -l /path/filename, i mounted the entire thing in /media/sample/ do i have to change permission for media also

& Thanks for the Reply
 
Old 03-10-2015, 09:51 AM   #4
manoj_hanse
Member
 
Registered: Mar 2008
Posts: 48

Rep: Reputation: 1
Hi,

add this entry to /etc/hosts file : 192.168.1.99 sample.hopto.org

then use this command ping sample.hopto.org

if its able to ping...then there's no problem.

also the permissions on all files should at least be : rwxr--r-- for files and for directories: rwxr-x-r-x.

use chmod command to change it.

or use this command: chmod ugo+r filename

then restart the server /service.
 
Old 03-10-2015, 03:15 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
without bothering with "no-ip" ( i used it for a rather LONG time )
IS apache up and running ?
http://127.0.0.1:80
dose that above link take you to the DEFAULT Apache "success, you installed Apache" html page
( on rhel that is /var/www/http)

also i am guessing by your name "maharaj.narayanan" that you are NOT!!! using a comcast HOME service
they block apache

Last edited by John VV; 03-10-2015 at 03:16 PM.
 
Old 03-11-2015, 02:57 AM   #6
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi manoj_hanse & John VV,

I do have the hopto added into the hosts file, and i gave 777 rights to the folder which published the page,

& John im not running with the default apache that comes with redhat version, i have a some set of files and program which starts its own tomcat which is in my /media drive, BTW my real name is Maharaj
 
Old 03-11-2015, 03:52 PM   #7
manoj_hanse
Member
 
Registered: Mar 2008
Posts: 48

Rep: Reputation: 1
Hi,

I guess, you are now putting the required files in the right hosting directory. I guess it is hosts directory for tomcat in case of server like xampp. i have no clue about no-ip. so please check their documentation and put the files in right server root path.

Thanks.
 
Old 03-12-2015, 12:55 AM   #8
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi Manoj,
Ur right about the Root directory, when i just put the sample.hopto.org it pulls the sample html file from /var/www/html.
Does that mean i have to define the Document root in httpd.conf, BTW i did also tried that no luck got warning only.
 
Old 03-12-2015, 06:08 AM   #9
manoj_hanse
Member
 
Registered: Mar 2008
Posts: 48

Rep: Reputation: 1
Hi Maharaj,

do this:

use document root as /var/www/[your-website-root-directory-name]. then copy sample html file here. see if it works in browser. if it does but your sub-directory under this root directory.
 
Old 03-14-2015, 09:12 AM   #10
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Did u checked with firewall. U did not mention which version of red hat. pls mention ur current status of firewall
Code:
iptables -L
Also selinux may be preventing access
Code:
sestatus
 
Old 03-14-2015, 10:04 AM   #11
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Redhat server 6.4,
i tried even with fire wall disabled but it aint connecting,
sestatus is in enforcing mode,
i have a dummy html file saying hello in /var/www/html path when i type the no-ip the page is visible
but the application(pentaho) im running in tomcat with port 8080 is working fine within the LAN but not outside the network,
user permission are given for the folder which is located in /media path.
anything else do i have to check.?

thanks
 
Old 03-14-2015, 09:27 PM   #12
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
Don't gloss over what was said above: If you are running SELinux, you need to set the proper context for your files and directories.

~~~
getenforce
~~~

The above command will return 'Enforcing' 'Permissive' or 'Disabled', depending on the status of SELinux. If it is enforcing, set it to permissive and check your page again:

~~~
setenforce 1
~~~
 
Old 03-14-2015, 11:31 PM   #13
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Did u forward the port 8080 in ur modem/router? It should point to ur server serving httpd request (ipaddress)
 
Old 03-16-2015, 02:59 AM   #14
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
yes, I did port forward them.
 
Old 03-16-2015, 04:58 AM   #15
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
make sure the service is up and running and listning on port 8080.
Code:
netstat -natup
U can ask for support to red hat.i assume u r using paid subscription of rhel.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 404 File or directory not found totlin Linux - Server 3 11-14-2014 01:12 AM
error 404 requested resource not found sawgata Linux - Newbie 6 05-29-2010 04:20 AM
Bugzilla3 Error 404 Not Found problem qhhatman Linux - Newbie 8 09-13-2009 09:45 PM
Apache error: 404 Not Found, why? cucolin@ Ubuntu 3 08-14-2006 11:01 AM
apt-get 404 Not Found error Steve Riley Ubuntu 3 06-21-2006 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration