N
N
neborg2019-01-30 15:09:45
PHP
neborg, 2019-01-30 15:09:45

PHP not working in Ubuntu how to setup?

There is 1 site on the server, the folder address is /var/www/html/site.ru
Everything works fine
. Accessible from outside at site.ru.
The second site (m.site.ru) has the address
var/www/html/m.site.ru and
access from the Internet is available.
The page is displayed but php does not work.
The most interesting thing is that if you change the folder for the site drugoi-site.ru to /var/www/html/site.ru in the conf file, then it starts working. The problem is that php works only in the /var/www/html/site.ru folder and doesn't work in the others. How to make php work in other folders.

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName site.ru
DocumentRoot /var/www/html/site.ru
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName site.ru
DocumentRoot /var/www/html/site.ru
SSLEngine on
SSLCertificateFile /etc/ssl/site.ru/certificate.crt
SSLCertificateChainFile /etc/ssl/site.ru/ca_bundle.crt
SSLCertificateKeyFile /etc/ssl/site.ru/private.key
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName m.site.ru
DocumentRoot /var/www/html/m.site.ru
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName m.site.ru
DocumentRoot /var/www/html/m.site.ru
SSLEngine on
SSLCertificateFile /etc/ssl/m.site.ru/certificate.crt
SSLCertificateChainFile /etc/ssl/m.site.ru/ca_bundle.crt
SSLCertificateKeyFile /etc/ssl/m.site.ru/private.key
</VirtualHost>
</IfModule>

Site name changed

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question