Directories under /var/www/html not showing after upgrade to 1.4



  • Server
    • FOG Version: 1.4
    • OS: CentOS 7
    Description

    Maybe this is more a apache config issue than Fog.
    I have some directories under /var/www/html (iso, repos, configs) and are used with fog ipxe to boot systems and automated installs.
    After upgraded to 1.4, puting in browser: http://(ip)/iso or /configs it returns with incorrect redirection error msg.
    Commenting lines from /etc/httpd/conf.d/fog.conf:

    RewriteEngine On
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
    RewriteRule ^/(.*)$ /fog/api/index.php [QSA,L]
    

    all work like expected, but not tested with the fog things (snapin, clone…)
    what these lines do?


  • Senior Developer

    @Thiago I think that’s what I needed to know.

    If you need the directory listing, you might be better creating an index.php file that will generate the list of files for you.

    You can even make them links so you could test downloads.

    The idea is we use an API now and if the index file doesn’t exist (which it’s attempting to locate) it will attempt to redirect through the API. I just needed clarity on whether there was an actual issue of which you just let us know there wasn’t. It was just your “testing” that was failing (which is helpful, but not requried).



  • @Tom-Elliott It is not failing, the installer can get the file successfully!!!
    what is not working: list directory content in browser (same behavior using Indexes option in apache)
    This is not a problem because i can access file directly, but just curious about this.
    Sorry for taking your time.

    @Wayne-Workman i agree with your recommendation and i will implement this soon.

    Thanks all you guys…


  • Senior Developer

    @Thiago As long as the repos/centos/base exists it should go ther to get the file. Same for iso/centos7

    Is this failing?


  • Moderator

    @Thiago I recommend moving your CentOS repository and ISOs to another server.



  • i am acessing directory with ipxe menu, like:

    :centos7auto
    set base http://${fog-ip}/repos/centos/base
    set iso http://${fog-ip}/iso/centos7
    kernel ${iso}/vmlinuz
    initrd ${iso}/initrd.img
    ....and other things
    

    i have no index.html or .php at /var/www/html and welcome.conf can not show his test page.


  • Senior Developer

    Are you searching a specific directory?

    You shouldn’t be "scanning " a directory from a browser. The intent behind these lines, however, are for our API system now.

    The Rules mean:
    If the called url is not a file and is not a directory, redirect to the api system.


Log in to reply
 

335
Online

38727
Users

10554
Topics

99921
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.