hello -
an odd issue is showing up for me.
i create a new RL Google-VM, install latest-n-greatest virtualmin:
sh -c "$(curl -fsSL https://download.virtualmin.com/virtualmin-install; )" \
-- \
--bundle LAMP \
--branch stable \
--hostname host.edwardsmark.info \
--yes \
;
the create a VS with just the DNS for domain and apache website options and access it. i get the standard Virtualmin default index.html` file displaying normally.
then i test it like so:
<?php
echo get_current_user();
echo '<br />';
echo 'whoim = '.exec('/bin/whoami');
echo '<br />';
phpinfo();
?>
this displays my correct new VS name.
finally i created a very cgi simple script to try and isolate the problem:
#! /bin/sh
printf âcontent-type: text/plain\n\nâ ;
date;
whoami;
this shows that the user is apache and not the new VS username.
any suggestions what i might be doing wrong?
if it helps, here is my httpd.conf that was created by virtualmin:
<VirtualHost *:80>
ServerName zzyzx.com
ServerAlias www.zzyzx.com
ServerAlias mail.zzyzx.com
ServerAlias webmail.zzyzx.com
ServerAlias admin.zzyzx.com
DocumentRoot /home/zzyzx/public_html
ErrorLog /var/log/virtualmin/zzyzx.com_error_log
CustomLog /var/log/virtualmin/zzyzx.com_access_log combined
ScriptAlias /cgi-bin/ /home/zzyzx/cgi-bin/
DirectoryIndex index.php index.htm index.html
<Directory /home/zzyzx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/zzyzx/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.zzyzx.com
RewriteRule ^/(?!\.well-known)(.*)$ https://zzyzx.com:20000/ [R=301,L]
RewriteCond %{HTTP_HOST} =admin.zzyzx.com
RewriteRule ^/(?!\.well-known)(.*)$ https://zzyzx.com:10000/ [R=301,L]
RemoveHandler .php
RemoveHandler .php8.3
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php-fpm/177439884821910.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>
<VirtualHost *:443>
ServerName zzyzx.com
ServerAlias www.zzyzx.com
ServerAlias mail.zzyzx.com
ServerAlias webmail.zzyzx.com
ServerAlias admin.zzyzx.com
DocumentRoot /home/zzyzx/public_html
ErrorLog /var/log/virtualmin/zzyzx.com_error_log
CustomLog /var/log/virtualmin/zzyzx.com_access_log combined
ScriptAlias /cgi-bin/ /home/zzyzx/cgi-bin/
DirectoryIndex index.php index.htm index.html
<Directory /home/zzyzx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/zzyzx/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.zzyzx.com
RewriteRule ^/(?!\.well-known)(.*)$ https://zzyzx.com:20000/ [R=301,L]
RewriteCond %{HTTP_HOST} =admin.zzyzx.com
<FilesMatch \.php$>
SetHandler proxy:unix:/run/php-fpm/177439884821910.sock|fcgi://127.0.0.1
</FilesMatch>
RewriteRule ^/(?!\.well-known)(.*)$ https://zzyzx.com:10000/ [R=301,L]
RemoveHandler .php
RemoveHandler .php8.3
SSLEngine on
SSLCertificateFile /etc/ssl/virtualmin/177439884821910/ssl.combined
SSLCertificateKeyFile /etc/ssl/virtualmin/177439884821910/ssl.key
SSLProtocol
| SYSTEM INFORMATION | |
|---|---|
| OS type and version | RL 10.1 |
| Webmin version | 2.621 |
| Virtualmin version | 8.1.0 GPL |
| Webserver version | Apache/2.4.63 |
| Related packages | SUGGESTED |