Compare commits
No commits in common. "5835cef7cacee4ae0044a27b9a45f87a62726dd1" and "a25a9068666367b24400828ab3d619f463b65017" have entirely different histories.
5835cef7ca
...
a25a906866
|
@ -5,7 +5,6 @@ chmod 755 /usr/local/bin/vpanel-verify-access.sh
|
|||
cp -a etc/* /etc/
|
||||
chmod 440 /etc/sudoers.d/vpanel
|
||||
a2enconf vpanel
|
||||
sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/8.1/fpm/php-fpm.conf
|
||||
service php8.1-fpm restart
|
||||
service apache2 restart
|
||||
cp -a panel /srv/www/html/
|
||||
|
@ -15,3 +14,4 @@ rm -r /srv/www/html/panel/f3/.git
|
|||
find /srv/www/html/panel -type d -exec chmod 755 {} +
|
||||
find /srv/www/html/panel -type f -exec chmod 644 {} +
|
||||
chown -R vpanel:vpanel /srv/www/html/panel
|
||||
|
||||
|
|
|
@ -37,24 +37,6 @@ class Vhosts extends \Panel\Vhost {
|
|||
$cert_array['alternative'] = $alternative;
|
||||
$f3->set('cert_array', $cert_array);
|
||||
}
|
||||
} else {
|
||||
/* no cert, get dns info */
|
||||
$dnsinfo = array();
|
||||
$dnsinfo['server_addr'] = $_SERVER['SERVER_ADDR'];
|
||||
# A record
|
||||
$dnsinfo['a']['color'] = "red";
|
||||
if ($certdomain_dns = dns_get_record("$vhost", DNS_A)) {
|
||||
if ($certdomain_dns[0]['ip'] == $dnsinfo['server_addr']) {
|
||||
$dnsinfo['a']['status'] = "Verified";
|
||||
$dnsinfo['a']['color'] = "black";
|
||||
$dnsinfo['verified_count']++;
|
||||
} else {
|
||||
$dnsinfo['a']['status'] = "Update";
|
||||
}
|
||||
} else {
|
||||
$dnsinfo['a']['status'] = "Create";
|
||||
}
|
||||
$f3->set('dnsinfo', $dnsinfo);
|
||||
}
|
||||
/* get user info */
|
||||
$username = $vhost_array[0]['username'];
|
||||
|
@ -84,12 +66,12 @@ class Vhosts extends \Panel\Vhost {
|
|||
|
||||
if ($f3->exists('PARAMS.vhost')) {
|
||||
|
||||
// $vhost_array = $f3->get('vhost_array');
|
||||
$vhost_array = $f3->get('vhost_array');
|
||||
|
||||
/* convert data for frontend display */
|
||||
// nothing to convert
|
||||
|
||||
// $f3->set('vhost_array', $vhost_array);
|
||||
$f3->set('vhost_array', $vhost_array);
|
||||
|
||||
$vhost = $f3->get('PARAMS.vhost');
|
||||
$f3->set('page_header', "Details for $vhost");
|
||||
|
|
|
@ -34,10 +34,11 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<check if="isset(@cert_array)">
|
||||
<true>
|
||||
<br><br>
|
||||
<table>
|
||||
<true>
|
||||
<table>
|
||||
<tr>
|
||||
<th style="white-space: nowrap;">Certificate</th>
|
||||
<th style="white-space: nowrap;">Expiration</th>
|
||||
|
@ -50,45 +51,15 @@
|
|||
<td style="white-space: nowrap; text-align: right;">{{ @cert_array.alternative | raw }}</td>
|
||||
<td style="white-space: nowrap;"><a href="{{@BASE}}/Certs/{{@vhost_array.virtualhost}}/Delete?r={{@PATH}}">Delete</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</true>
|
||||
<false>
|
||||
<hr>
|
||||
<check if="{{ @dnsinfo.a.status=='Verified' }}">
|
||||
<true>
|
||||
You need a Security Certificate. <a href="{{@BASE}}/Certs/{{@vhost_array.virtualhost}}/Add?r={{@PATH}}">Click Here</a> to add one now.
|
||||
</true>
|
||||
<false>
|
||||
<span style="color:red">You need a Security Certificate for {{ @vhost_array.virtualhost }}.</span>
|
||||
<br>
|
||||
Before you can add one you must make the DNS change listed below. Once that's completed come back here and this message will change to an option to create a Security Certificate.
|
||||
<br>
|
||||
<small>Note that after you add DNS records it can take some time for the changes to propagate and show up here.</small>
|
||||
<br><br>
|
||||
<table>
|
||||
<tr><th style="color:{{ @dnsinfo.a.color }}" colspan="2">{{ @dnsinfo.a.status }} A Record for {{ @vhost_array.virtualhost }}</th></tr>
|
||||
<tr><td style="text-align: right;">Type:</td><td>A</td></tr>
|
||||
<tr><td style="text-align: right;">Host:</td><td>{{ @vhost_array.virtualhost }}</td></tr>
|
||||
<tr><td style="text-align: right;">Value:</td><td>{{ @dnsinfo.server_addr }}</td></tr>
|
||||
<tr><td style="text-align: right;">TTL:</td><td>3600 (or default)</td></tr>
|
||||
<tr><td></td><td><small>This should be the only A record for {{ @vhost_array.virtualhost }}.</small></td></tr>
|
||||
</table>
|
||||
<br><br>
|
||||
<table>
|
||||
<tr><th style="color:{{ @dnsinfo.a.color }}" colspan="2">Verify CNAME Record for www.{{ @vhost_array.virtualhost }}</th></tr>
|
||||
<tr><td style="text-align: right;">Type:</td><td>CNAME</td></tr>
|
||||
<tr><td style="text-align: right;">Host:</td><td>www.{{ @vhost_array.virtualhost }}</td></tr>
|
||||
<tr><td style="text-align: right;">Value:</td><td>{{ @vhost_array.virtualhost }}</td></tr>
|
||||
<tr><td style="text-align: right;">TTL:</td><td>3600 (or default)</td></tr>
|
||||
<tr><td></td><td><small>This should be the only record for www.{{ @vhost_array.virtualhost }}.<br>Note this admin did not check for this record, it may already exist.</small></td></tr>
|
||||
</table>
|
||||
</false>
|
||||
</check>
|
||||
<hr>
|
||||
</false>
|
||||
</table>
|
||||
</true>
|
||||
<false>
|
||||
<a href="{{@BASE}}/Certs/{{@vhost_array.virtualhost}}/Add?r={{@PATH}}">Add Security Certificate</a>
|
||||
</false>
|
||||
</check>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table>
|
||||
<tr><th colspan="2">Remote Access</th></tr>
|
||||
<tr><td style="text-align: right;">Protocol:</td><td>SFTP (SSH File Transfer Protocol)</td></tr>
|
||||
|
|
Loading…
Reference in New Issue
Block a user