[SOLVED] how to edit apache vhost directives

Reported by: J Poulianitis
Created: 1 month 21 days ago
Last reply: 1 month 9 days ago
Views: 1058

Hi, today found and installed your script, seems good, welldone to all.

Can't figure out how to change apache directives to a specific vhost, for example i want to enable directory listing to a vhost.

Also is it possible to install other php versions?

Thank you

Hi

To enable directory listing simply create .htaccess file in your site directory

Options +Indexes
# or #
IndexIgnore *
You can install any PHP versions  you want manually.
By default TinyCP install PHP7 with Apache or older if 7 not exists.

You can modify /etc/apache2/apache2.conf manually. TinyCP wont override it.
VHosts config files for each sites are always generated by TinyCP so better to do not modify it manually.
To specify PHP version for site you can also do it via .htaccess file

to switch to PHP 5.6:

AddHandler application/x-httpd-php56 .php
to switch to PHP 7:
AddHandler application/x-httpd-php7 .php
to switch to PHP 7.1:
AddHandler application/x-httpd-php71 .php
etc.

In next update will be able to enable PHP FPM for sites.

I'd like to integrate phpmyadmin with this and need to edit the apache.conf, every time I do and restart tinycp it seems the file is locked. Any help on this matter?
Join our Discord server
Write a reply Edit a reply