Can't Access Vesta Panel On Custom Port After Update

November 25, 2018 Tags VestaCP

One of my hobby servers runs VestaCP on it. For some odd reason, after an update, I was unable to load the Panel using either the custom port I had set nor the default one.

The Vesta service was indeed running though, so I wasn't entirely sure what the issue was.

The solution was to add a firewall rule to the custom port again. I am not sure why the update would have removed the rules, but creating it again fixed my issue:

v-add-firewall-rule ACCEPT 8098 v-update-firewall

And just to be sure, restart the VestaCP service:

service vesta restart

For anyone wondering how to set a custom port for Vesta you simply have to change the port in the nginx config file located at:


CSS Negative Top Positions Next Element Incorrectly

November 25, 2018 Tags Programming

This may seem like an absolute silly post, but last night after a 5 hour coding session I couldn't figure out why I was having issues with some CSS positioning.

I had three elements, and I wanted the second element to appear on top of the lower part of the first element. So naturally I used:

.second { position: relative; top: -200px; }

At first, cool it works. But the problem is, it basically pushes up the element but doesn't affect the original place it was in, so the third element was appearing much further down and didn't look good at all.

To fix this, I tried the following...:

.second { position: relative; top: -200px; margin-bottom: -200px; }

At first this looked like it worked too, but I was having issues with the height of the third element being screwed up.

Now.. I was really tired, and it took me a ridiculous amount of time to realize that the simple fix was to simply use margin-top with a negative value instead of top:

.second { position: relative; margin-top: -200px; }

And voila, it works like I had intended it to. After that I decided it was time to go to sleep :)

VS Code Delete Every Other Line

June 8, 2018 Tags Programming, Fixes

For some reason, after having edited a file in cPanel's online code editor, when I downloaded said file to my local machine it had empty lines added after every existing line. Of course, this was very ugly and made the file double the length in the editor.

Anyway, here's a quick guide on how to remove these extra lines.

  1. Press ALT+H to open the replace box (top right).
  2. Make sure Regex is enable by clicking the dot+star icon. It will add a color border to it.
  3. Enter (.*)\n\1\n in the search box.
  4. Enter $1\n in the replace box.
  5. Hit replace all, and you're good to go!

cPanel FTP Failed - Unable to connect to port 21 on

May 24, 2018 Tags Programming, Fixes, cPanel

So I woke up to numerous emails from the cPanel Monitor service telling me that the ftpd service was offline. I tried various ways to restart the service but it just wouldn't start, I kept getting the same error message:

warn [restartsrv_pureftpd] The 'pureftpd' service's PID file '/var/run/' did not appear after 10 seconds.
Waiting for “pureftpd” to restart …………Waiting for pure-ftpd,pure-authd to shutdown ....... terminated.
warn [restartsrv_pureftpd] The 'pureftpd' service's PID file '/var/run/' did not appear after 10 seconds.

…warn [restartsrv_pureftpd] The 'pureftpd' service's PID file '/var/run/' did not appear after 10 seconds.


Service Status
pure-ftpd (/usr/sbin/pure-ftpd [...]) is running as root with PID 18545 (systemd+/proc check method).

Service Error
(XID fhx2ad) The “pureftpd” service failed to start.

Startup Log
May 24 13:41:45 [...] systemd[1]: Started Pure-FTPd.
May 24 13:41:45 [...] systemd[1]: Starting Pure-FTPd...

pureftpd has failed. Contact your system administrator if the service does not automagically recover.

I checked CSF Firewall to see if that was somehow blocking the port, I updated the server's plugins and ran a manual cpanel upgrade but nothing worked.

Well, it turns out the culpret is an option in the /etc/pure-ftpd.conf config file.

If you're having issues with PureFTPD and cPanel, check if CallUploadScript is set to yes by running this command in shell:

grep Call /etc/pure-ftpd.conf

If you see "CallUploadScript yes" then you need to disable it as it turns out that when trying to start the pureftpd service it attempts to start the pure-uploadscript service but it wont work. Simple fix is:

vi /etc/pure-ftpd.conf

Find the line that says CallUploadScript yes and change it to no.

Restart ftp service and you're good to go!