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

Thread: Apache2 installed and running but access problem

  1. #1

    Default Apache2 installed and running but access problem

    Hi all,

    I got a little problem with altering the permissions of my www folder and some files (apache conf files like document root). I can access them but when i change them i can't save them. Clearly a permission problem. So i figure to use chmod and set permissions.

    Strangely this didn't work. Also tried to modify users and groups but nothing happened.

    Code:
    client>chmod 755 srv/www/htdocs/
    Looks like the correct code does it? Or am i doing something wrong?

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Apache2 installed and running but access problem

    I have an apache server set with these:
    sudo chmod -R 755 /path_to/doc_root
    sudo chown -R john:users /path_to/doc_root

    That might fix the problem, but if not, there's a bit more background reading here:
    HowTo: Configure a Linux Apache Web Server on Suse/openSUSE
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3

    Default Re: Apache2 installed and running but access problem

    Thanks, this helped . However, does this work also with the configuration files? I just want to edit the documentroot so it becomes more accessible .

    Lets say: /usr/username/desktop?

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Apache2 installed and running but access problem

    Quote Originally Posted by drcomputer80 View Post
    Thanks, this helped . However, does this work also with the configuration files? I just want to edit the documentroot so it becomes more accessible .

    Lets say: /usr/username/desktop?
    Can you use a whole lot more words to say that again -- I'm not the least bit familiar with your setup
    e.g. what configuration files and what is the relevance of /usr/username/desktop to your web server
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5

    Default Re: Apache2 installed and running but access problem

    I just want to edit the httpd file so i can change the documentroot of the apache webserver. I'm a little lazy about this, hehe. I'll give you an example.

    My server is configured or set to (documentroot): /srv/www/htdocs This directory is not accessible because of the permissions set by SuSE. So if i want to edit index.html i need to set the permissions to my user account (like you told me). If i don't do this i can edit the file but not save it. However, i browsed through my personal folders and saw a public_html folder, which is more accessible than /srv/www/htdocs.

    In order to change this i need to set the documentroot to /home/username/public_html. But my httpd.conf consist of "includes" to other files. So i need to know if the command is useful for configuration files.

    Anyway, i'll figure it out. Thank you very much for helping me

    Kind regards,

    drcomputer

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Apache2 installed and running but access problem

    Ok, depends a bit how you set the configuration, perhaps using Yast??
    It's pretty simple once you locate the vhost config file.
    Show me the contents of the directory /etc/apache2/vhosts.d/ and we'll see if Yast used Virtual Hosts.
    (you can use this console command: ls -l /etc/apache2/vhosts.d)
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  7. #7

    Default Re: Apache2 installed and running but access problem

    It's a permissions problem..
    If i don't do this i can edit the file but not save it
    Open the file manager with su i.e kdesu dolphin
    Browse to file open with editor of choice from file manager and you'll have the correct permissions.

    Or open it exactly as in kdesu kwrite /path/to/file

    Though I thought the yast httpd interface made this easy.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Apache2 installed and running but access problem

    Instead of changing the stock DocumentRoot, just enable virtual hosting and make a default virtual host with your new DocumentRoot and any other settings you want to override. That way you don't need to modify the standard setup.

  9. #9

    Default Re: Apache2 installed and running but access problem

    Quote Originally Posted by FeatherMonkey View Post
    It's a permissions problem..


    Open the file manager with su i.e kdesu dolphin
    Browse to file open with editor of choice from file manager and you'll have the correct permissions.

    Or open it exactly as in kdesu kwrite /path/to/file

    Though I thought the yast httpd interface made this easy.
    I have to confess... I'm like a newbie to this and although the interface is easy, i'd like to learn both ways. I was a windows guy and setting up a apache webserver under windows is lots easier than on linux(SuSE in my case). In windows you have just one httpd.conf file to edit and it is donė. In linux however, you have lots of files for settings i don't even understand.

    I just use apache for development only and locaŀ. The rest is upto my webhoster when i upload the files.

    It is done now, i've found the documentroot of the server and it is workinġ. Weļŀ, apache iş, haha. Now i have to check if PHP is working which i assume it is working.

    I do have one last question about linux. I'm learning every day, especially about BASH but is there some info out there to learn and practice? I mean real good info, not some tutorial on how to install or configure things?

    Anyway, it is solved now. Thanks for the help guys (and ladies if present). I hope to be able to help others like you helped me .

  10. #10

    Default Re: Apache2 installed and running but access problem

    It's not just Linux it can be distro specific, I use a distro that also uses one global config, can't answer why Suse went for split.

    As for learning by doing and breaking and fixing. I tend to use the GUI a lot more in Suse as that is the way it is geared up, and then resort to manual edits when the GUI fails me.(Though my latest 11.1 is gui-less)

    I found the quickest way I learned was by playing with the puzzle distro's. What do I mean by that? The ones that you put together piece by piece, you'll bang your head against the desk for days at a time. Eventually it becomes easier and the skills acquired doing such like distro's make the user friendly ones easier to deal with. Just have to remember the distro quirks.

    Playing with gentoo got me started but frustrated the hell out of me. Then think slackware is a similar model and arch is a binary. But afaik they all start you with the very basics, not a lot more than network stack, kernel and shell.

    Then as my sig learning google-fu took the longest, the answers are normally always out there. Though I've been defeated by one and just may yet ask the noob question on the irc channel.
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

Page 1 of 2 12 LastLast

Posting Permissions

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