Skip to content

Conversation

@PauMAVA
Copy link

@PauMAVA PauMAVA commented Oct 30, 2020

I have created a simple installation script that will allow users to install and configure fancy-index with one single command.

I have also added a README.md file with instructions on how to use the installation script. Note that until this isn't merged the command on the README.md won't work. You should use the following command if you want tot test it:

curl https://raw.githubusercontent.com/PauMAVA/fancy-index/main/installers/debian/fancy-apache.sh -o fancy-apache.sh; sudo bash fancy-apache.sh

If a user has already fancy-index installed, this script can be used to update the software to the latest commit and to configure new VHosts.

@olentulen
Copy link

Hi! I have recently used this script to install fancy-index on my server, but it only works in the folder where it is installed. Wasn't it supposed to work on all “index of” pages? :)

@PauMAVA
Copy link
Author

PauMAVA commented Dec 14, 2020

Hi! The script should work for all Index Of pages under the document root of the VHost you chose in the installer. Also, don't choose a document root or one of its subdirectories as an installation folder as it will expose the fancy-index files.

For example, let's say I have a VHost for web.mydomain.com and the document roots of all my webs are in /var/www/. In this case, the document root would be at /var/www/web.mydomain.com/ and I would choose the fancy index installation folder as /var/www/fancy-index/. Once the script finishes all indices under /var/www/web.mydomain.com/ should be configured with fancy-index. In my case there is the following code in the VirtualHost:

Alias "/fancy-index" "/var/www/fancy-index"
<Directory "/var/www/fancy-index">
    AllowOverride All
    Options Indexes MultiViews FollowSymLinks
    Require all granted
</Directory>

Let me know if installing fancy-index on another folder works and thanks for your question! 😄

@olentulen
Copy link

Hello! Several times I tried to install the script, but the same error comes out: the only index that works is /fancy-index. It seems like a mistake cannot be made in such a simple installation, but not in my case.

Снимок экрана 2020-12-29 в 06 13 25

Снимок экрана 2020-12-29 в 06 04 21

@PauMAVA
Copy link
Author

PauMAVA commented Dec 29, 2020

Hello! I have detected the error and I will update the script in the following minutes. The problem is that apache2 blocks access to the .htaccess file in the upper directory by default.

When accessing /fancy-index it founds the copy of the .htaccess file in the fancy-index installation directory so it loads fine there.

@PauMAVA
Copy link
Author

PauMAVA commented Dec 29, 2020

I have updated the script. Let me know if it is working fine now. Be sure to delete the <Directory> section and also the Alias below #Autogenerated in the apache site file before reinstalling.

@olentulen
Copy link

olentulen commented Dec 30, 2020

Hi again! I made a clean install and now it works!
/fancy-index is still visible, but I've 711 the folder.
Thank you very much for your help :)

Снимок экрана 2020-12-30 в 06 35 10

@virus-rpi
Copy link

virus-rpi commented Sep 15, 2022

pi@raspberrypi_ ~ 15 09 2022 14_27_50

Why does that happen?

That is the file i tried to configure:

<VirtualHost :80>
ServerAdmin @
**.**

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants