i'd like to deny access to example.com/phpmyadmin or secure it with a password-prompt using .htaccess and .htpasswd.
Is that possible? If so,how can i achieve that?
I don't need to access phpmyadmin over the web.
I'm running an openlitespeed wordpress droplet on DigitalOcean.
Thanks for any help!
Cheers,
Dan
Follow this guide
If you don't need to visit it from browser at all:
Just remove phpmyadmin from the WebAdmin > Virtual Hosts >
Context.
If you want to set password to protect it, follow Method 2 from the guide:
Log into SSH console and create a password file:
touch /usr/local/lsws/conf/PASS
chown lsadm:lsadm /usr/local/lsws/conf/PASS
Navigate to WebAdmin > Security
Set Realm Name = example, and User DB Location = /usr/local/lsws/conf/PASS
Click /usr/local/lsws/conf/PASS to create a user/password
Navigate to WebAdmin > Virtual Hosts > Context > phpmyadmin
Set Realm to example
Best
Related
How do I setup SSL for DigitalOcean droplet running OpenLiteSpeed NodeJS? Is there any command that I can run to make this possible? Thanks
Auto setup:
An interactive script that runs will first prompt you for your domain or subdomain.
You can press CTRL+C and continue to SSH. The prompt will open again the next time you log in, and will continue to do so until you finish the whole setup.
Please input a valid domain:
Please verify it is correct. [y/N]
Enter the root domain only, then the system will add both the root domain and the www domain for you.
You can also automatically apply Let's Encrypt SSL if your domain is pointed to this server already. Enter y and your email address to finish the process.
Do you wish to issue a Let's encrypt certificate for this domain? [y/N]
Please enter your E-mail:
Please verify it is correct: [y/N]
Once finished, you should see Certificate has been successfully installed...
Do you wish to force the HTTPS rewrite rule for this domain? [y/N]
Once finished, force HTTPS rules will be applied
Do you wish to update the system which includes the webserver? [Y/n]
This script will automatically go away after your domain has been added.
Manually setup:
Navigate to OpenLiteSpeed Web Server WebAdmin > Listeners, and add Your Domain to HTTP/HTTPS.
Once the DNS records are set up, you can generate the SSL certificate. Be sure to substitute the correct domain name in the following command:
certbot certonly --webroot -w /var/www/html/ -d example.com -d www.example.com
Navigate to OpenLiteSpeed Web Server WebAdmin > Listeners > SSL, and edit the following three items:
Private Key File = /etc/letsencrypt/live/example.com/privkey.pem
Certificate File = /etc/letsencrypt/live/example.com/fullchain.pem
Chained Certificate = Yes
Save and perform a Graceful Restart.
Refer https://docs.litespeedtech.com/cloud/images/nodejs/#optional-setup
I'm configuring a linux cluster (CentOS 7.2) and I'm trying to login against LDAP.
My LDAP server is configured and runs correctly, both LDAP users and groups appear when I get the list throw getent passwd / getent group, and logins are possible by SSH with LDAP users. id ldapuser returns the expected ldapuser information.
My problem is when I do login, the home directory is not created.
I edited the file /etc/pam.d/system-auth to add the following line:
session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
but no success. I tried to restart nslcd, the O.S, ... , but nothing worked.
I can't see what I am missing...
Thanks for your help!
I executed authconfig --enablemkhomedir --update on each machine and it worked
Created in ubuntu all the necessary configuration for access via FTP, but at one point I found a problem:
To restrict each user to only access to your /home/$USER but I want each user to access the folder /www/$DOMAIN
You can make an alias? Or alo for the same effect ... I tried a link but it gives an error and the connection goes down on FTP ...
Help: S
Look at /etc/proftpd/proftpd.conf if you've used this log
EDIT: Do you want the user both access www & home?
If you want your user to access /var/www/USER try ln -s /var/www/user /home/USER/www
and then in the proftpd.conf it'll look like ~/www
I am new to SSH and Linux and I hope someone can help. I am working on a site with a dedicated server (VPS) and I am also working with WordPress. I used SSH to log into the site's files with Cyberduck (I've also used FileZilla successfully) and install WordPress on the server.
The problem I'm having now is that I can't edit or add any plugins or files on WordPress because WordPress doesn't have access to the site's FTP which is standard. It asks for credentials and when I attempt to enter them into the WordPress dashboard, it doesn't work. There is an option for FTP and there is an option for FTPS (SSL). I know these are different than SSH but I tried the SSH credentials anyway and obviously they didn't work.
I then logged into the SSH through Mac Terminal and did the instructions here:
1. Login as root through SSH.
2. Next add the user account you want using the 'useradd' command
useradd <username>
3. Now create a special group for that user.
groupadd <groupname>
4. Now to add the user to the group
gpasswd -a <username> <groupname>
5. Change the group ownership of the special directory to that group.
chgrp -R groupname
/path/to/your/web/directory
6. Enable write permissions
chmod -R g+rw
/path/to/your/web/directory
And it worked. I was able to add a new user (and I could confirm this by looking at the /etc/passwd file). I then logged out and tried to log in with Cyberduck using the new credentials and setting it to FTP (instead of SSH) and it didn't work. It did however work to log in with SSH with the new user credentials. So it seems I can successfully add a new SSH user but not a new FTP user.
I need the user to be FTP so I can hook WordPress up and begin editing. How do I specific the user to be FTP as opposed to SSH? Thanks for any help!
I've found an answer to my question and figured I'd document here for anyone else who runs across this issue. It's surprisingly easy.
Just go to this link and download the plug-in:
http://wordpress.org/plugins/ssh-sftp-updater-support/
You obviously have to upload this straight into your WordPress directory in the SFTP (/wp-content/plugins) in order for it to work correctly since it won't work from within the WordPress dashboard.
Once those files are there, when WordPress prompts you to login to your 'FTP' it will have an option for SSH which you can select and log-in. Voila!
I am setting up wordpress on my Ubuntu server.
To install a wordpress theme, I need to provide wordpress with an FTP account that it can use to download the theme files.
I tried my usual FTP user and it is saying "cannot create directory ...."
How do I create an FTP user that wordpress can use to install themes and give it the proper permissions it needs to do so?
Running VSFTPD on Ubunu 12.04 with Webmin
Thanks
First create an FTP user, the set them to the WordPress group. The FTP user must have access permission to your upload, tmp, and template folders.