How to change background color and...

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to change background color and...

Postby KeyZHostHD » 21. March 2020 16:26

as the title suggests how do I change the background color of apache, it's not like a normal website, it's a web directory, and I just want to make it more eye appealing
would be nice if anyone could tell me how to change the background color, and how to change the style of the file listing.
file paths would also be appreciated.

Thanks
- KeyZ
KeyZHostHD
 
Posts: 3
Joined: 21. March 2020 16:23
XAMPP version: Apache/2.4.41
Operating System: Windows 10 64-bit

Re: How to change background color and...

Postby Nobbie » 21. March 2020 20:21

Do you have any knowledge about Apache and Modules?

Probably you are speaking about a directory listing in Apache. Apache itself cannot show a directory listing. The most sophisticated directory listing in Apache is realized with the Apache Module "mod_autoindex". See https://httpd.apache.org/docs/2.4/mod/m ... index.html for a full documentation including many examples.

In that mod_autoindex there are some Options which can be used at runtime, one of the most powerfull options means to apply a CSS Style Sheet for the index listing. That Option is called "IndexStyleSheet", see https://httpd.apache.org/docs/2.4/mod/m ... stylesheet

With the help of that StyleSheet, which can applied for the index listing, you have the opportunity to apply your own background for the "body" Tag, where you can apply any background color, or an background image or whatever you like. You must have some extended knowledge about HTML and CSS in order to understand how to configure everything you need.

Last not least, of course you can use your own index.php for a directory listing. If you do so, you can do everything what you want. Feel free to write your own directory listing instead of using an Apache Module.
Nobbie
 
Posts: 11665
Joined: 09. March 2008 13:04

Re: How to change background color and...

Postby KeyZHostHD » 21. March 2020 20:53

Nobbie wrote:Do you have any knowledge about Apache and Modules?

Probably you are speaking about a directory listing in Apache. Apache itself cannot show a directory listing. The most sophisticated directory listing in Apache is realized with the Apache Module "mod_autoindex". See https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html for a full documentation including many examples.

In that mod_autoindex there are some Options which can be used at runtime, one of the most powerfull options means to apply a CSS Style Sheet for the index listing. That Option is called "IndexStyleSheet", see https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html#indexstylesheet

With the help of that StyleSheet, which can applied for the index listing, you have the opportunity to apply your own background for the "body" Tag, where you can apply any background color, or an background image or whatever you like. You must have some extended knowledge about HTML and CSS in order to understand how to configure everything you need.

Last not least, of course you can use your own index.php for a directory listing. If you do so, you can do everything what you want. Feel free to write your own directory listing instead of using an Apache Module.


oh I forgot to add that I am using apache in xampp, and I have absolutely no knowledge about CSS or HTML, and I have heard about the mod_autoindex but I can never figure where its located or where I can put one that I downloaded
currently, I am also trying to change the number of characters a file can have in the listing, which I also struggle with, and there seems to be close to none info online about my issues
KeyZHostHD
 
Posts: 3
Joined: 21. March 2020 16:23
XAMPP version: Apache/2.4.41
Operating System: Windows 10 64-bit

Re: How to change background color and...

Postby Nobbie » 21. March 2020 22:25

KeyZHostHD wrote:and there seems to be close to none info online about my issues


No, there is plenty of documentation.

Read the whole link which i provided, more or less all of your issues are documented there. But of course, you have to learn HTML and CSS and much more, configuring Apache is a sophisticated task. It will take you quite a lot of time and energy to learn how things are working.
Nobbie
 
Posts: 11665
Joined: 09. March 2008 13:04

Re: How to change background color and...

Postby KeyZHostHD » 22. March 2020 02:48

Nobbie wrote:
KeyZHostHD wrote:and there seems to be close to none info online about my issues


No, there is plenty of documentation.

Read the whole link which i provided, more or less all of your issues are documented there. But of course, you have to learn HTML and CSS and much more, configuring Apache is a sophisticated task. It will take you quite a lot of time and energy to learn how things are working.


hmm, then I am either blind or stupid, because the only thing I have been able to do out of the list of things I want to be done, is to change the logos for .rar files.
could you at least provide me with the path to the .htaccess file? and if it's not there by default, which path and folder should I put one in?

and what files should I go about editing that come with xampp installation?
oh and another thing to note, I have been lucky once or twice to find a line of code that looks like something I want to be changed, but whenever I edit and save it, then reset the server, I don't see any changes, at least visually completely contradicting what I thought the line of code would do.
KeyZHostHD
 
Posts: 3
Joined: 21. March 2020 16:23
XAMPP version: Apache/2.4.41
Operating System: Windows 10 64-bit

Re: How to change background color and...

Postby Nobbie » 22. March 2020 11:08

There is no default .htaccess location, simply put an .htaccess file just into the folder(s) which you want to display. Instead of putting .htaccess into a folder, you also can add a <Directory ...> block for that folder into httpd.conf, or into any VirtualHost configuration (if you have any) and restart Apache.

Using .htaccess files instead of using <Directory ...> requires sufficient setting of AllowOverride clause. If unsure, use "AllowOverride All" in your Apache configuration.

I am also unsure if your Xampp uses that module mod_autoindex, you did not tell about, i only assumed it. You should check that.
Nobbie
 
Posts: 11665
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 78 guests