I cannot locate a account from WHM (list accounts). I can access cpanel for that domain (mysite.com/cpanel).It just disappeared from whm. So now I cant directly go to mysite.com. I don't have a backup but all the files and db exist for that domain. Any solution to this problem because I cant find such a thing.
How do i find the option via WHM Control Panel?
If you have root SSH access of our server then check /etc/trueuserdomains and /etc/userdomains file because you without root access you can not check these files. if you have only cPanel access then you need to contact your hosting provider to check your mission domain logs.
Was there any cPanel upgrade performed on server recently?
If you have root access then login to your server via SSH and run the following command:
$ /scripts/rebuildcpusers
It should rebuild files for each domain under /var/cpanel/users from source databases.
If you has a root acces to server
Access SSH to server
Check /etc/userdomains – this file should contain the the domain and username that’s missing.
Check /etc/trueuserdomains domain.com: username
Check /var/cpanel/users/USERNAME
/var/cpanel/users/USERNAME
DNS=domain.com
IP=ipaddress
USER=username
OWNER=root (This will be set to ‘root’ unless the account was created under a reseller).
Check the Apache configuration file /etc/httpd/conf/httpd.conf and make sure that a virtual host exists for your domain. Try to rebuild apache /scripts/rebuildhttpdconf
Finally run /scripts/updateuserdomains
Related
I have a WordPress blog on an AWS EC2 server. I followed this tutorial from AWS for configuring the web root /var/www/html permissions to directories 2775 and files 0664 with ownership apache:apache, and I was able to install my site and edit it through wordpress normally.
However, last week I noticed odd behavior on the site and upon looking at the web root, I found a new directory had been created that was full of spammy php files. The directory had a random name and ownership apache:apache
This is a webserver, so it has 0.0.0.0 access on ports 80 and 442 (I have SSL through LetsEncrypt and HSTS).
My question is: how was someone able to create a new directory on my server and how do I prevent it from happening in the future? My ec2-user uses an SSH key for login and I have not created any other users on the server. I know now that 775 is probably too open, but if apache does not have a login how could someone write to this directory?
You can set in-bound rules on your instance security group to access or allow SSH using your IP address to prevent other attack and make sure you can use a nulled or hack script on the website.
I have a bitnami WordPress instance using AWS lightsail. I need to migrate the site to another identical AWS instance. I created a PHP installer from the first instance using the Wordpress Duplicator plugin.
I then uploaded the file onto the new server to a folder (opt/bitnami/apache2/htdocs/).The instructions I've seen online they say I just need to navigate to the location of the installer in a browser and it will run. However, when I attempt to access the PHP file from a browser I just get an error on the front-end saying:
OOPS! THAT PAGE CAN’T BE FOUND
I have seen suggestions online that the installer be placed into a public folder called html_public but my instance doesn't have a folder like that. I changed the access rights to the folder, and the installer, to be full rw access.
Any ideas how I can get this to work?
You must config the Security Groups firewall to open the HTTP port.
Open the Amazon VPC console at [https://console.aws.amazon.com/vpc/]
On the Inbound Rules tab, choose Edit the port range 80, 443 - Source: Anywhere - IP Address: 0.0.0.0/0 and Save.
I have a website and it sits on the IIS Server and I have a folder on another server the file server. I have set the Virtual directory to the folder on the fileserver. This application both servers are on the same domain, but in the future I will have serves that are not on the same domain.
I have tried to set up local users on both machines and set up the app pool to use the local accounts and I get
System.UnauthorizedAccessException: Access to the path is denied.
and
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
I have set the virtual to connect as the local user and get the same error.
I have setup a domain user and then set the app pool to use the domain user and set to use pass through and when I test the settings in Directory Browsing it says everything is good but I get the same error from the webpage.
I have setup a domain user and then set the app pool to use the domain user and set to the connect as to the user and when I test the settings in Directory Browsing it says everything is good but I get the same error from the webpage.
I have set the apppool to use my login and it works with pass through permissions.
Is there something I am missing.
You need to set the folder permissions in your separate folder to give access to the "computer$" account of the server where your application is hosted.
See here: https://www.iis.net/learn/manage/configuring-security/application-pool-identities
application pool identities also use the machine account to access
network resources.
So in the server where you have your data files you should set the folder permissions to allow access to the machine name where your website is hosted.
I had this same challenge when deploying a web app using IIS on a Windows 2012 Server.
The issue was the App Pool Account did not have Full rights to the Website Root.
All I had to do was to go to the directory where the Website Root resides and then right-clicked on it. Next, I selected Security and then gave the IIS-Users group full access to the directory.
For me IIS-Users group contains all Users/App Pool Accounts that are created in IIS.
That's all.
I hope this helps
I have created a domain user specifically for the the virtual directory and it appears to work, but is this best practice?
I built a WP site on a particular server. I did not set or change any folder permissions and everything worked perfectly. Mainly, I could upload files and images.
I then moved the install to a different server and domain. Suddenly I could not upload to the media library.
On checking the permissions of the wp-content folder and its sub-folders the permissions were set to 755. I only assume this is what they were set to on the previous server.
By setting them to 777 I could then upload files but understand this is a big security risk. I then set it back to 755 and cannot upload again.
Can anyone explain why 755 is ok on one server but not on another please? and what I could do on the new server to make 755 acceptable?
The file permissions are correct 755, you'll have to check the file owner also.
Do not assume the file permision and owner on the development server will be correct on other servers (different os's can give issues as the one you have, different webservers from different os's can give again issues as above).
It also depends on the way you upload your files:
-you can do it throw ftp then you'll have to check the ftp settings (how it saves the files, under which user).
-if you use ssh to upload then it depends on the user that you used to connect to the server
and so on... (I saw the ftp tag but wanted to describe this also )
At this point you'll have to make sure that the website files have as owner the webserver (different server setups require different websrevers - www-data vs apache vs ... )
In the end it depends on the control (options you can change) on the server, do you have ssh access? Do you have to contact your host for this corrections?
If you are not administrating this new domain server then contact it's administrator it is a setting issue(of the ftp ) or a bug/error that he should handle.
I've tried looking around for a guide on moving a wordpress site into a dev environment, but all of the guides I've seen have been about CREATING one, as opposed to my situation, where I need to move an existin site to a local VM to create a dev/testing environment.
I'm fairly well-versed on how to create a dev environment from a regular old website, but just about everything wordpress-related gets me confused somehow.
Where I am now:
I've created a CentOS 6.0 VM using VMware on a Windows 7 machine. I've installed PHP, Apache, MySQL, and FTP-Server, along with all of the required updates and such. I have disabled SELinux.
I've moved the contents of the var/www/html/ folder from the live (production) server over to the var/www/html/ folder on my VM (currently exists within /var/www/html/my-website/)
My current issue:
When I attempt to access localhost/my-website/ I'm getting "Error establishing a database connection". An attempt at localhost/my-website/wp-admin/ tells me that either the database server is down (do I have to start this separately?) or that the username and/or password information in wp-config.php is incorrect (this was all simply moved from one place to another).
Any assistance would be greatly appreciated.
Have you updated wp-config.php to include your localhost and database info for your local dev environment?
I bet wp-config.php is still pointing to your remote server DB which the MySQL DB wont allow for external connections
Also, make sure that the dev is using the same domain as the live version. On my windows machine, I do this by changing my hosts file. I'm sure there is something similar on your VM.
If I am unable to do this and I need the dev version to be under a different domain I would do the following.
Create mysqldump of live database
Edit the dump and replace
all occurrences of livedomain.com with devdomain.com (if you dont do
this at least check the wp_options table for the livedomain.com
occurences.
Change wp-config.php database settings.
I always ensure to use the same domain (controlled by local hosts file), and same db config in my dev environment as in my live environment.
If you've not changed the wp_options table for (option_name = siteurl or option_name = home), then chances are if you type in devdomain.com into your browser it will redirect to newdomain.com
Hope this helps
Blake
I know this was been answered but just to be perfectly clear:
on Centos6 you need to run httpd with php, and the mysql server. In the mysql server you have to import the database dump from the live website then you have to edit the config in wordpress to match the username and password on wordpress.
now when moved the db does not keep the username and password so I suggest you do this
commands to be run in shell:
service mysqld start
chkconfig mysqld on
that will take care of the db server running
then edit wp-config with username root and no password (I am pretty sure you have not added a password at mysql-server install)
post in here if you need further help.