Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Web server permission issue

  1. #1
    Join Date
    Mar 2011
    Beans
    12

    Question Web server permission issue

    So I've recently decided to make a website for my reenacting unit. The site is far from completion, however instead of using a hosting company for the site, I thought I would just make my own web server at the house and use that. Currently I just have the server running on my home network. I install Ubuntu server edition 10.10. Installation went well. I can access the server using it's static ip address. And use the server via ssh.

    Whenever I would open a web browser and type in the computers ip address, it would load the index.html file, but it wouldn't load all the css I wrote for it. Also, when I tried to use the links to different pages like photos.html. I got and "Forbidden: You do not have permission to access /photos.html on this server.".

    I decide edit the default file in /etc/apache2/sites-available so that the DocumentRoot and Directory pointed to /home/me/www. The goal of this was hopefully to change the permissions and allow me to view other pages.

    Unfortunately now I get "Forbidden: You do not have permission to access / on this server."

    I've been using ubuntu desktop for 2ish years now. Though this is my first time trying to use the server edition. If anyone has an idea as to my problem with this server, I'd appreciate any help you can offer!

  2. #2
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    544
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Web server permission issue

    At first glance it looks like the Apache user (www-data) doesn't have access to read your files, but that's strange because everything in /home/yourname/ is world readable unless you changed the permissions.

    You should check /var/log/apache2/error.log to see why it's serving up forbidden errors.

  3. #3
    Join Date
    Mar 2011
    Beans
    12

    Re: Web server permission issue

    Well, after messing with permission for /var/www, I've been able to successfully host the website. However, I still get the Forbidden error from my home folder.

    This is the what has flooded the error.log for apache:
    Code:
    [Mon Apr 11 19:25:50 2011] [crit] [client 192.168.1.100] (13)Permission denied: /home/welsh/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    Not 100% sure what this means, although I do know that I do not have a htaccess file in either /var/www or /home/welsh/www.

  4. #4
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,521
    Distro
    Ubuntu Development Release

    Re: Web server permission issue

    If you use all default apache2 configuration files, then if you make a directory at /home/welsh/public_html , it should automatically be available via the relative address "./~welsh/index.html" within your index.html page at /var/www/index.html Or any other page that you can already navegate to. The absolute address www.yoursite.com/~welsh/ should also work from anywhere.

    It is on purpose that you should not normally be able to access your home directory. If you made configuration file changes so that you expect to be able to access non standard directories, then we need to check your .htaccess requirements settings (and I have not reminded myself about them yet and for this reply).

    Edit: The users public_html directory is NOT available by default. The userdir module has to be enabled first with "sudo a2enmod userdir" and, of course, "sudo /etc/init.d/apache2 restart".
    Last edited by Doug S; April 15th, 2011 at 03:28 PM. Reason: addedd correction

  5. #5
    Join Date
    Mar 2011
    Beans
    12

    Re: Web server permission issue

    Thanks for the reply! I'll try the html_public folder tomorrow after my classes.

  6. #6
    Join Date
    Mar 2011
    Beans
    12

    Re: Web server permission issue [solved]

    Well, I just figured out my /home/me/www problem. My friend informed me that it was most likely because I encrypted my home folder

  7. #7
    Join Date
    Apr 2006
    Location
    NS, Can
    Beans
    36
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Web server permission issue

    That could do it. Still having the permissions issue?
    “Don’t Follow Your Passion, But Always Bring it With You.” ~Mike Rowe

  8. #8
    Join Date
    Mar 2011
    Beans
    12

    Re: Web server permission issue

    Thankfully no, I was about to set default in sites-available to /home/me/www and it works fine now. I want to thank everyone for their help. Now if anyone knows a really easy to follow postfix setup, that'd be awesome! lol.

  9. #9
    Join Date
    Apr 2006
    Location
    NS, Can
    Beans
    36
    Distro
    Ubuntu 17.10 Artful Aardvark

    Re: Web server permission issue

    Wow, I see what you mean: https://help.ubuntu.com/10.10/server...C/postfix.html

    It seems rather involved at first glance, but maybe if you broke it down?
    “Don’t Follow Your Passion, But Always Bring it With You.” ~Mike Rowe

  10. #10
    Join Date
    Mar 2011
    Beans
    12

    Re: Web server permission issue

    Yeah, my main problem is that when I install postfix, it doesn't install correctly, so I can't even perform the following line:
    Code:
    sudo dpkg-reconfigure postfix
    lol, so I'm lost.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •