Remove FTP support - SFTP is the future
This commit is contained in:
@ -12,7 +12,7 @@ print_header('FAQ');
|
||||
<tr><td>I have an .htaccess file, but it doesn't work. How can I fix it?</td><td>.htaccess files are meant for Apache2 webservers. My server is based on NginX, which is much faster due to using static configuration files and not reading files like .htaccess at runtime. You can <a href="https://danwin1210.me/contact.php">contact me</a> and tell me your sites address where the .htaccess file is. I will then check your .htaccess and convert the rules to NginX rules and apply those.</td></tr>
|
||||
<tr><td>I just uploaded my page, but it's broken. HELP!</td><td>Most likely your site makes use of rewriting rules, which are typically located in an .htaccess file or are mentioned in a README file. Just <a href="https://danwin1210.me/contact.php">contact me</a> in this case. Also see the previous question.</td></tr>
|
||||
<tr><td>Can I host a porn site?</td><td>Yes as long as your content is legal you may upload adult content.</td></tr>
|
||||
<tr><td>What is the directory structure for when I connect via (s)ftp?</td><td>There are several directories you on the server for your account:<br><b>Maildir</b> - used to store your mails in (don't touch it)<br><b>data</b> - You can store application data here that should not be accessible via your site. E.g. configuration or database files.<br><b>tmp</b> - anything saved here will automatically be deleted after about 24 hours<br><b>www</b> - this is where you upload your website which becomes then available under your domain.<br><b>logs</b> - you will find webserver logs here<br><b>.ssh</b> - by uploading your ssh public key as authorzed_keys in this folder, you can authenticate to sftp using your ssh key, without a password</td></tr>
|
||||
<tr><td>What is the directory structure for when I connect via sftp?</td><td>There are several directories you on the server for your account:<br><b>Maildir</b> - used to store your mails in (don't touch it)<br><b>data</b> - You can store application data here that should not be accessible via your site. E.g. configuration or database files.<br><b>tmp</b> - anything saved here will automatically be deleted after about 24 hours<br><b>www</b> - this is where you upload your website which becomes then available under your domain.<br><b>logs</b> - you will find webserver logs here<br><b>.ssh</b> - by uploading your ssh public key as authorzed_keys in this folder, you can authenticate to sftp using your ssh key, without a password</td></tr>
|
||||
<tr><td>My application is very ressource intensive or I want to host a different service e.g. my own tor relay. Can you get me a VPS?</td><td>Yes, if you have special requirements, want a dedicated VPS for your application or just want to anonymously support the TOR network (or other networks) without having to deal with server setup etc. I can offer you a managed VPS hosting. However this will not be for free. It depends on which server you want me to get. For details, <a href="https://danwin1210.me/contact.php">contact me</a></td></tr>
|
||||
<tr><td>I want to also publish my site on clearnet. Can you offer a clearnet relay?</td><td>Yes, I can offer you a free subdomain on my server, e.g. yoursite.danwin1210.me, which you can configure in your dashboard. Or if you have your own domain you can use that one, point your DNS settings to the IPs given in your dashboard and <a href="https://danwin1210.me/contact.php">contact me</a> for setting up an SSL certificate for your domain.</td></tr>
|
||||
<tr><td>I'm using CloudFlare, but when I open my site, it shows too many redirects.</td><td>By default CloudFlare makes unencrypted requests to the backend server, but my server tells any client that wants an insecure connection to upgrade to a secure connection and use https:// instead of http://. CloudFlare just forwards this redirection to the client, which then again asks CloudFlare for the same thing again, but CloudFlare still connects to my server via an insecure http:// connection. To fix this, go to your CloudFlare dashboard and manage your domains settings. Under "Crypto" you can find settings for SSL. Change the setting from Flexible to Full, which makes CloudFlare use a secure https:// connection when talking to my server.</td></tr>
|
||||
|
@ -2,15 +2,15 @@
|
||||
require('../common.php');
|
||||
$db = get_db_instance();
|
||||
$user=check_login();
|
||||
if(!empty($_POST['ftp_pass'])){
|
||||
$_SESSION['ftp_pass']=$_POST['ftp_pass'];
|
||||
if(!empty($_POST['sftp_pass'])){
|
||||
$_SESSION['sftp_pass']=$_POST['sftp_pass'];
|
||||
}
|
||||
if(empty($_SESSION['ftp_pass'])){
|
||||
if(empty($_SESSION['sftp_pass'])){
|
||||
send_login();
|
||||
exit;
|
||||
}
|
||||
$ssh=ssh2_connect('127.0.0.1') or die ('No Connection to SFTP server!');
|
||||
if(@!ssh2_auth_password($ssh, $user[system_account], $_SESSION['ftp_pass'])){
|
||||
if(@!ssh2_auth_password($ssh, $user[system_account], $_SESSION['sftp_pass'])){
|
||||
send_login();
|
||||
exit;
|
||||
}
|
||||
@ -116,7 +116,6 @@ if(!is_dir("ssh2.sftp://$sftp$dir")){
|
||||
}else{
|
||||
send_not_found();
|
||||
}
|
||||
fclose($tmpfile);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -355,7 +354,7 @@ function send_not_found(){
|
||||
function send_login(){
|
||||
print_header('FileManager - Login');
|
||||
?>
|
||||
<p>Please type in your system account password: <form action="files.php" method="post"><input name="ftp_pass" type="password" autofocus><input type="submit" value="Login"></form></p>
|
||||
<p>Please type in your system account password: <form action="files.php" method="post"><input name="sftp_pass" type="password" autofocus><input type="submit" value="Login"></form></p>
|
||||
<p><a href="home.php">Go back to dashboard</a>.</p>
|
||||
</body></html>
|
||||
<?php
|
||||
|
@ -278,10 +278,10 @@ if($count_dbs<MAX_NUM_USER_DBS){
|
||||
<p>You can use <a href="/phpmyadmin/" target="_blank">PHPMyAdmin</a> and <a href="/adminer/?username=<?php echo rawurlencode($user['mysql_user']); ?>" target="_blank">Adminer</a> for web based database administration.</p>
|
||||
<h3>System Account</h3>
|
||||
<table border="1">
|
||||
<tr><th>Username</th><th>Host</th><th>FTP Port</th><th>SFTP Port</th><th>POP3 Port</th><th>IMAP Port</th><th>SMTP port</th></tr>
|
||||
<tr><th>Username</th><th>Host</th><th>SFTP Port</th><th>POP3 Port</th><th>IMAP Port</th><th>SMTP port</th></tr>
|
||||
<?php
|
||||
foreach(SERVERS as $server=>$tmp){
|
||||
echo "<tr><td>$user[system_account]</td><td>$server</td><td>$tmp[ftp]</td><td>$tmp[sftp]</td><td>$tmp[pop3]</td><td>$tmp[imap]</td><td>$tmp[smtp]</td></tr>";
|
||||
echo "<tr><td>$user[system_account]</td><td>$server</td><td>$tmp[sftp]</td><td>$tmp[pop3]</td><td>$tmp[imap]</td><td>$tmp[smtp]</td></tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
@ -16,7 +16,7 @@ print_header('Info');
|
||||
<li>Up to <?php echo MAX_NUM_USER_DBS; ?> MariaDB (MySQL) databases</li>
|
||||
<li><a href="/phpmyadmin/" target="_blank">PHPMyAdmin</a> and <a href="/adminer/" target="_blank">Adminer</a> for web based database administration</li>
|
||||
<li>Web-based file manager</li>
|
||||
<li>FTP and SFTP access</li>
|
||||
<li>SFTP access</li>
|
||||
<li>command line access to shell via SSH</li>
|
||||
<li>1GB disk quota and a maximum of 100.000 files<?php echo ENABLE_UPGRADES ? ' - upgradable' : ''; ?></li>
|
||||
<li>mail() can send e-mails from your_system_account@<?php echo ADDRESS; ?> (your_system_account@hosting.danwin1210.me for clearnet)</li>
|
||||
|
Reference in New Issue
Block a user