Migration to VPS w/Plesk - migration

I had a shared hosting package with 1and1 and I just moved over to their VPS hosting that uses Plesk. I already had the domains moved over the VPS server and I already uploaded all of the files via FTP.
I talked to an agent yesterday and he helped me setup the main page on the website so that it would go to the appropriate root directory. The main website is working properly whenever I go the main domain name, however, whenever I go to website.com/blank or website.com/stuff, I receive a 404 error.
The strange part is that I see the files in Plesk file manager, I just don't know why they are not displaying properly. I didn't change anything in the migration process.
I did not change the code on any of the pages and I have contacted their customer support team a number of times, but they have been unable to resolve the issue.
Can anyone tell me what I should do to make sure that the files are associated with the correct pages?

Have you checked the permission for the files and folder under your domain, this seems to be an issue with either your ownership or permission of the files. And if thats not the problem it could even be your .htaccess file.. make sure you have transferred your .htaccess file as well from old shared hosting to new VPS.

Related

Backend Error after moving a PrestaShop website from one host to another

I'm moving this website http://farmtrust.tn built using PrestaShop in a new Hosting provider. This is the new URL http://shop.farmtruster.com. And now when I try to access the admin back-end I get a FatalErrorException.
FatalErrorException
Compile Error: Symfony\Component\Debug\DebugClassLoader::loadClass(): Failed opening required '/var/www/html/vendor/composer/../symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/RegisterCsrfTokenClearingLogoutHandlerPass.php' (include_path='/var/www/html/vendor/pear/pear_exception:/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/archive_tar:.:/usr/share/php')
in DebugClassLoader.php line 156
Also, the site is not functioning http://shop.farmtruster.com it shows Not Found.
The requested URL was not found on this server.
I'm trying to host in AWS in an EC2 instance I've installed xampp first but then it stopped suddenly functioning so I installed manually PHP MySQL apache...
The website files are in var/www/html folder Note that http://shop.farmtruster.com redirects me to http://shop.farmtruster.com/fr/ so I've concluded that traduction is working.
I hope you can help me
Debug steps:
Check if that .php file does exist in that location, if not copy it (them) over from the original Prestashop archive.
Remove the var/cache completely, it'll get recreated.
Check the files and directories ownership/permissions. The owner should be the apache user and the permissions 0755 for directories and 0644 for the files.

Yii app on Amazon EC2 how to make it work?

I would like to deploy a Yii app to Amazon EC2.
I've installed httpd, mysql, php and all the necessary modules.
The app was running fine on my wampserver localhost.
I've transferred everything (DB, app folder) but I'm having issues with accessing the site. I see default apache site, and I see directory structure under var/www/html/app folder, and var/www/html/app/web gives a blank page (or Internal Server Error). I have a .htaccess file in var/www/html/app/web. I was searching a lot, and have found informations about allowoverride, virtual hosts (I have only IP, what is server name then? the IP?), etc, and have tried a few different things, but I don't want to mess it completely up, and I'm pretty sure it must be some very simple adjustments to make it work, but I don't know what (maybe some settings with EC2 like elastic IP? I dont yet have that one but I'm not sure I need it). I don't have much experience, can you please point me to the right direction what else I have to set in order to make it work? Thank you very much!
UPDATE: I have set Elastic IP up and registered a domain.
I have simply chosed another image, and without any special actions it works. The first was an Amazon Image, now it's an Ubuntu.

Why does my work file work locally, but not on my webhosting server?

I developed a website and got a Tomcat account on Dailyrazor. My website runs fine when I start Tomcat from the command line and stick my war file in Apache's webapps folder. I access it by http://localhost:8080/dkashtanartportfolio/.
Now should it be as easy as dropping the war in my webapps folder on my DailyRazor Tomcat server? I expect to be able to access my website via http://www.<domain-name>.com/<war-file-name>/, which should look like http://www.dkartportfolio.com/dkashtanartportfolio/
I get a 404 error and I do not know why? Can anybody help?
Some of the DailyRazor accounts don't allow automatic deploy. So after uploading war you need to restart Tomcat. I use shell to execute tomcat_manage stop, followed by tomcat_manage start.
You may also be able to request restart by opening a help ticket.
For some reason, my accounts expect war's to be in public_html and not webapps. I have an old account so they may have changed the way new accounts work.
You need to look carefully into tomcat/conf/server.xml and make sure that you've specified correct path to app folder. Also you need to keep in mind that if you have shared tomcat you need to unpack your war file before requesting tomcat restart - it won't unpack automatically.

Drupal 7: problems with file permissions and IMCE in sites/default/files directory

I have looked around a great deal on the Drupal forum and elsewhere but I cannot yet resolve this.
I have had to reinstall a large, fully functional site (Drupal 7.18) onto a new server. This has gone very smoothly. However, I do not seem to be able to set permissions for my sites/default/files directory in a manner that keeps it accessible and safe when browsing using the IMCE file browser.
Usually I set sites/default/files (and subdirectories within it) as 755, with files within these directories as 664. This works well on many other Drupal 7 sites I have built.
HOWEVER in this case, with these permissions I get the message "Unable to get a working directory for the file browser".
Only by setting directory permissions as 777 can I browse the files in these directories using IMCE - and I know that is really bad practice on shared hosting.
Please can someone advise on troubleshooting this? I have spent hours but I am getting nowhere.
I wonder if the ownership of the files and directories themselves is wrong. If they are wrong, can anyone direct me to step-by-step instructions for changing them?
Examining the 'problem' files and directories using FireFTP, I see
that both user and group names are the same as the FTP username that
was given me by my web host.
Looking at another Drupal site that works properly, I see that files
and directories in sites/default/files are set to user 531/group 528.
Thanks in anticipation! I am running D7.18 on PHP 5.2.10 with extensions enabled. Everything else seems to be working very well indeed. However, I am not sure I have the Apache or Linux skills needed to resolve this, or even to ask my hosts the correct questions ...
755 basically means that only the owner of the files can modify them, so you could try changing the directory permissions to 775 so that the owner and group can modify.
If you are using shared hosting I suggest you ask your hosting provider to help as they will have a better understanding of the users and groups on the server.
Cheers

ModX Cache: Files Being Written with Wrong Permissions

The title doesn't really sum it all up...
I have recently installed ModX Revolution 2.2.4 on an Apache server and I am having complications with the cache folder. Occasionally I have to manually clear the cache folder via ftp, but any files written there are owned by Apache and my account can't delete them. I have tried adding the "new_file_permissions" and "new_folder_permissions" to the system settings, but there is no change. The cache files are always owned by Apache and I have no access via ftp.
Also, files such as the .htaccess and really anything I upload (css etc) are seen as uneditable to modx unless I manually change them to 777 via ftp. I can't change owner and group though.
The server tech can't figure it out. This has come up before on the modx forums but it has never been answered.
Obviously, this is a server problem.
I had this problem (with an IIS server though), and the host needed to change some of their settings.
Especially, if MODX works on your different host(s).
That is the way it is supposed to work, your FTP account does not have permission to write files written by apache, your ftp may be a member of the group but does not have write permission. [needed to delete]. I suspect this is by design for security purposes.
Your new_file_permissions, new_folder_permissions are used for the modx file manager.
So you can do a couple of things:
Run modx under fastcgi, that way the user writing the files should be the same user as the ftp user.
OR
write a little script [you can even stuff it in a snippet] that will delete the cache files for you. [since it will be running as the apache user, it should be no problem.