So I now have my firewall set up, phpMyAdmin installed and behind .htaccess (took two tries but I was smrt and made a snapshot before trying the first time), MySQL secured. 🙂
One thing I cannot figure out is how the hell do you change your DigitalOcean account password? Nowhere in the settings or dashboard does it have an option for this. I thought under "security" it would be there but it just talks about SSH keys and two-factor authentication, which is what makes me want to change the password in the first place. Initially I made it 25 random characters and stored it in my password manager at home, but I'd like to be able to access it elsewhere if need be, so I enabled two-factor authentication but now I'd like to change the password to something more reasonable for me to remember. I guess I could just log out and use their forgot password link, though I would have imagined it would be a little more user friendly than that.
Question about SSH keys and best practices. So I have mine set up on my main computer at home. It works great. But I have two other PCs at home (one is a laptop) I'd like to set up and realistically I'd like to connect at work as well. I would imagine that reusing a private key is considered a big no-no, so should I regenerate a pair for each computer at home, and then at work just rely on passwords? Seems to me that storing a private key on a work computer is probably considered poor practice. While I don't think I'm going to be let go anytime soon, it is always possible that my access to this machine could be suddenly restricted. I highly doubt anything like that would happen (I have my Dropbox synced with my work computer, so I have other personal stuff here), but I guess it's best to think of all possibilities. What are your guys' thoughts?
dalecosp;11050367 wrote:
ps -aux | grep http
root 1200 0.0 0.9 37636 9444 ?? Ss 30Jul15 0:52.98 /usr/local/sbin/httpd -DNOHTTPACCEPT
www 27864 0.0 1.1 37636 10892 ?? I 11:24AM 0:00.07 /usr/local/sbin/httpd -DNOHTTPACCEPT
www 28027 0.0 1.1 37636 10948 ?? I 11:57AM 0:00.06 /usr/local/sbin/httpd -DNOHTTPACCEPT
www 28077 0.0 1.1 37636 10840 ?? I 12:06PM 0:00.04 /usr/local/sbin/httpd -DNOHTTPACCEPT
www 28594 0.0 1.1 37636 10876 ?? I 1:13PM 0:00.05 /usr/local/sbin/httpd -DNOHTTPACCEPT
So, ps(1) is your friend. Probably should omit the "-" on Linux, I think that's a BSD-ism ("ps aux" instead).
I think the hyphen is optional. It worked for me with and without, and I've seen plenty of commands online where some omit it and others keep it.
This is what I get (ps aux | grep apache2):
root 1078 0.0 2.3 382264 12024 ? Ss Aug24 0:02 /usr/sbin/apache2 -k start
www-data 1089 0.0 3.0 387364 15120 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1090 0.0 2.9 388636 14844 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1091 0.0 2.6 387760 13312 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1092 0.0 3.1 388360 15724 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1093 0.0 1.8 385344 9068 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1286 0.0 1.2 382304 6396 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1289 0.0 1.2 382304 6396 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1290 0.0 2.7 387092 13968 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1291 0.0 2.8 387336 14536 ? S Aug24 0:00 /usr/sbin/apache2 -k start
www-data 1292 0.0 2.6 387604 13472 ? S Aug24 0:00 /usr/sbin/apache2 -k start
brent 2308 0.0 0.1 11740 932 pts/0 S+ 09:16 0:00 grep --color=auto apache
dalecosp;11050367 wrote:The directory you are in doesn't allow you write access. You could "chmod" it, or "chown" it, but generally you want to be careful about such things. What groups are you in? What does 'id' tell you?
It's the public HTML folder, shouldn't it have some kind of write access? And why does the echo command have different restrictions than touch? I was still able to create the file and add content to it, it just took me two steps instead of one.
id tells me this:
uid=1000(brent) gid=1000(brent) groups=1000(brent),27(sudo)
As part of one of the guides it walked you through adding your new user to the sudo group.
I am barely grasping Linux as it is, let's not complicate things by making me learn a whole new webserver at the same time :p I will probably experiment with it in the future but for now I'm going to stick with what I know. At least I've seen an Apache config file.