LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-10-2013, 05:43 PM   #1
Jyan
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Problem accessing my apache server, .htaccess?


My problem seems very simple, but I haven't managed to find any information that helped :/

I have set up an apache2 server on centOS 6 to host owncloud on. I can see everything no problem when I access via the local IP address, but when I try to get on from outside my network I get the authentication required pop up saying "A username and password are being requested.. the site says "Site-Wide".

I had earlier set up a .htaccess file and I have read about the allowOverride directive etc.. and as far as I can tell, my server shouldn't be asking for any sort of authentication.

Is there some kind of default site-wide authentication? I can't find anything in httpd.conf
 
Old 02-10-2013, 07:52 PM   #2
descendant_command
Member
 
Registered: Mar 2012
Posts: 802

Rep: Reputation: 182Reputation: 182
How is it connected to the net? NAT router?
Done the port-forwarding correctly?
Is your router control panel running on external.ip:80 ?
 
Old 02-10-2013, 10:59 PM   #3
Jyan
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Yes, and I have no problem accessing the machine through ssh from outside the network. I am able to connect to the Apache server, it just gives me the authentication popup. The username / pw I specified for the .htaccess doesn't work for it either. I am confused because it is operating as if there is some .htaccess restrictions on the site, but I undid everything I changed and then restarted the server.
 
Old 02-11-2013, 12:01 AM   #4
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 50
Are you using drupal (CMS) as your web project?
Have you tried removing the .htaccess file and checked from outside network?
 
Old 02-11-2013, 12:07 AM   #5
Jyan
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
I am not using drupal. And yes, there is no .htaccess file anywhere in /var or any of the sub directories, which is why I am so lost now :S
 
Old 02-11-2013, 12:57 AM   #6
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 50
Upload html web page in a directory and try to access from outside LAN.
Do not use php in the file. Just pure html.
Please respond.
 
Old 02-11-2013, 01:11 AM   #7
fortran
Member
 
Registered: Nov 2011
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Fedora
Posts: 300
Blog Entries: 2

Rep: Reputation: 50
Following is the content of .htaccess file if any user wants to protect it from outside network but not in the home network.
So it asks password for outside LAN but does not ask in the LAN

Code:
Satisfy any
# USER
AuthUserFile /var/www/my_project/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
require valid-user
# IP
order deny,allow
deny from all
allow from 192.168.2.
But you want it little different. You want that it should not ask password from anywhere.
If there is .htaccess file in your project, please modify according to your requirement.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Simple logging of logins to apache server using .htaccess for authentication? damgar Linux - Server 1 06-01-2012 01:00 AM
How can I disable Options +FollowSymlinks in .htaccess files on an Apache web server? abefroman Linux - Software 3 09-11-2010 09:25 AM
Auth apache using htaccess with a active directory server michaelux Linux - Server 0 12-03-2009 03:51 PM
Apache problem .htaccess fipeso Linux - Networking 2 05-12-2005 11:56 PM
Problem accessing subdirs from doc root on Apache server ph0ngwh0ng Linux - Newbie 4 04-24-2004 12:02 PM


All times are GMT -5. The time now is 07:51 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration