Results 1 to 5 of 5

Thread: Problem accessing Apache2 and lampp folders

  1. #1
    Join Date
    Sep 2020
    Beans
    4

    Problem accessing Apache2 and lampp folders

    Good day everyone, currently i am working in ubuntu 22.10 and im having a peculiar situation. Im trying tu run some php code in a website, i try to use apache2 first but when i try to reach the folder (Using sudo nautilus) nautilus close unexpectedly the same with lampp i click on "Open application folder" and when i try to navigate it closes again. Anyone has some recomendation for this?

  2. #2
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,170
    Distro
    Kubuntu

    Re: Problem accessing Apache2 and lampp folders

    the default location for web content in apace2 is /var/www/html/
    you need to have libapache2-mod-php installed to run php

    you will likely want to set display_errors to On in /etc/php/*/apache2/php.ini (should be line 503)

    it sounds like your file browser is crashing, check the output in your terminal, you could try a different file browser like thunnar

    i usually using nano to edit files in a terminal
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  3. #3
    Join Date
    Sep 2020
    Beans
    4

    Re: Problem accessing Apache2 and lampp folders

    Well thunar works perfectly, indeed it was a problem with nautilus Anyways i used a sudo chmod 777 /var/www/html for putting my files there sadly, i dont see a way to make html a favorite folder in the sidebar. Thanks for the help

  4. #4
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,170
    Distro
    Kubuntu

    Re: Problem accessing Apache2 and lampp folders

    drag/drop it in to the side bar

    you can just change the group
    Code:
    sudo chown root:$USER /var/www/html
    sudo chmod 774 /var/www/html
    this way random users and www-data can not edit your files (if you had a bad security hole in your code at least www-data will not be able to alter your data)

    you could put a symlink to it in your home folder if needed
    Code:
    ln -s /var/www/html ./myLinktoHTML
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Problem accessing Apache2 and lampp folders

    Quote Originally Posted by zargathronax View Post
    Well thunar works perfectly, indeed it was a problem with nautilus Anyways i used a sudo chmod 777 /var/www/html for putting my files there sadly, i dont see a way to make html a favorite folder in the sidebar. Thanks for the help
    Whoa there Tex! You are using a GUI to deploy files for a website? Then you are using chmod 777? Do you want to be hacked?

    The best practice is to setup a deploy script that places the files into the live server area, sets the owner, group, permissions to be as restrictive as possible, optimizes and images BEFORE they are copied, and reloads the web server config (start/stop) to ensure all the updates are seen. This script should run with the userid and group necessary, not any end-user's login.

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
  •