A
A
apaicer2019-02-12 22:55:56
LAMP
apaicer, 2019-02-12 22:55:56

Setting up php as an apache module?

Good evening. There are such tasks
1. Create a user directory /var/www/user_name and it contains 3 directories for sites: site1.ru, site2.ru and site3.ru. (created via mkdir)
2. Configure for site1.ru site PHP operation mode as Apache module (mod_php5).
I don’t understand how to configure site1.ru if it doesn’t exist? I have everything through localhost (so that you understand this comes right after you had to install apache, mysql, php via yum.)
php as an apache module, I googled how to cling, there is only under windows, I do it on ocentOS.
This is how setting up php as an apache module looks like. I tried to do by analogy.

LoadModule php5_module "c:/server/php/php5apache2_4.dll" - НО этого файла у меня во всей системе нет.
AddHandler application/x-httpd-php .php
# Путь к файлу php.ini
PHPIniDir "с:/server/php"

How to configure the PHP mode as a module for a site that does not exist and how to do it in principle ?!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
g905, 2019-02-12
@g905

About a website that doesn't exist. You need to set up a virtual host in Apache. And add it to /etc/hosts. Google VirtialHost, there is nothing complicated there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question