LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Problem accessing my apache server, .htaccess? (https://www.linuxquestions.org/questions/linux-server-73/problem-accessing-my-apache-server-htaccess-4175449588/)

Jyan 02-10-2013 05:43 PM

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

descendant_command 02-10-2013 07:52 PM

How is it connected to the net? NAT router?
Done the port-forwarding correctly?
Is your router control panel running on external.ip:80 ?

Jyan 02-10-2013 10:59 PM

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.

fortran 02-11-2013 12:01 AM

Are you using drupal (CMS) as your web project?
Have you tried removing the .htaccess file and checked from outside network?

Jyan 02-11-2013 12:07 AM

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

fortran 02-11-2013 12:57 AM

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.

fortran 02-11-2013 01:11 AM

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.


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