how to setup web folder in /var/www to be accessed

Discussion in 'HOWTO-Related Questions' started by Abdussamii Sunusi, Mar 11, 2016.

  1. Abdussamii Sunusi

    Abdussamii Sunusi New Member

    I have web folder with root as username and group how do I set it up to be accessed on the internet with a registered domain. Thanks for your awaithing response
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    You need your registered domain to have at least one A-record pointing to the public IP of your server.
    Install any webserver you like and let it serve files from /var/www - how to do that, depends on which software you choose.
    Don't use root for serving files, while static files might not be a security risk, as soon as you setup scripting languages or cgi it can result in unwanted behaviour.
    Are you playing locally or did you rent a server already?
    If you have a server in "public space" e.g. a data centre, I hope you already know what you're doing...
     
  3. Abdussamii Sunusi

    Abdussamii Sunusi New Member

    my registered domain is working but when i tried to access it the web server apache2 was complaining "you don't have access this server. This is from google cloud machine
     
  4. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    Any hints in the access/error log which file has been tried to serve? is there a index file at all?
     
  5. Abdussamii Sunusi

    Abdussamii Sunusi New Member

    my web application configuration directory is as follows.
    drwxr-xr-x 2 www-data www-data 4096 Feb 29 15:54 html
    drw-r--r-- 4 www-data www-data 4096 Mar 8 16:46 www.example.com

    The web browser response is as follows:
    Forbidden
    You don't have permission to access / on this server.

    Apache/2.4.10 (Debian) Server at 1.2.3.4 Port 80
     
  6. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    so what's your configuration file look like? What aout the error/access log? www-data shouldn't be an issue for apache on debian to access.
     

Share This Page