Magento 2.0 first installation on shared hosting - .htaccess

I have installed/reinstalled my first magento 2.0 on one of my shared hosting server. I followed installation guide from magento devdocs. Everything seemed to bo ok, but when I visit site I dont see any images, css, scripts running in the background.
Ok, it must be .htaccess, I check my configuration, it seems to be ok, then I inspected elements and saw 403 errors,
dev.testing.com/two/pub/static/frontend/Magento/luma/sl_SI/Magento_Theme/favicon.ico
403 (Forbidden)
ok check .htaccess again, then I check in the file manager and saw all those files missing, can someone give me a hint what am I missing, doing wrong for the past days?

you can try these commands
your Magento install dir/
bin/magento setup:static-content:deploy
after these commands you have to give permission to var and pub folders by using
chmod 777 -R var
AND
chmod 777 -R pub

Related

WordPress site showing "This page isn't working" after installing it on Amazon EC2 (Linux) Instance via the Duplicator Plugin installer

So I configured My FREE Amazon EC2 (Linux) server with PHP and MySQL using SSH. Then Installed WordPress and set it up accordingly. Which went smoothly and could access perfectly through my "IP/directoryname". After that I had a lot of issues with writing directories and Transferring files. Which I took care of using these commands,
sudo chown -R apache:apache /var/www/html
sudo chown -R ec2-user:ec2-user /var/www/html
sudo chmod -R 755 /var/www/html
Increased the PHP Upload limit using SSH to 256M. And when my test site was running perfectly, I decided to install a Prebuilt site of mine using the Duplicator Plugin which has an installer.php file with the "Old Site Files and Database" a package. It requires an empty directory. So I deleted all my files using FTP from my test site Directory and uploaded the Duplicator Package and Installer. Installed the site and put my EC2 mysql info accordingly. I selected to overwrite my old Database and delete all existing tables. Which installed successfully (At least the installer said that!). But I can't seem to access my site anymore. Now my site says, "This page isn't working". I don't know what to do here. Can you guys spare me a little bit of your time. Any info you need , just ask. Could this be a WordPress Permalink issue? I don't know how to update the Permalink table using SSH. Maybe I've deleted an important Directory file when I deleted the Old Directory files?
Your Friendly Neighborhood Sidekick,
Ratul

Linux Mint: Bitnami Xampp access issue

I have installed Bitnami Xampp on linux mint, it is installed inside /opt/
The application is unable to access(Write/Read) files and hence not able to work on it.
Any Solution Please........
Thank You
It is simple access issue. So I need to give read write access to folder and file using chmod command:-
--$ sudo chmod -R 777 opt
I have to admit that I am don't really know Xampp but with the command you mentioned above you changed the the access rights for the top level directory /opt and thru using 777 you gave basically all rights to everbody using your system. If Xampp now tries to write something, it of course can because you gave it the rights (like to anyone else).
The -R option you used in the chmod-command above means, that you have changed the access rights for all subdirectories of /opt also (recursively).
I would recommend that you change this back to the original access rights for /opt and, if you need, just change the access rights for the directory where Xampp is placed. Then Xampp should also work because it can read an write in it's own subdirectory and there won't be any harm for or from other applications from /opt because they can't access /opt/Xampp and Xampp can't access their directories.
After the previous setting
--$ sudo chmod -R 777 opt Xampp is not working with following error
PhpMyAdmin “Wrong permissions on configuration file, should not be world writable!”
Then I followed PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!" and now working fine...
Thank god it saved me from switching back to Windows. That I hate.....

Drupal 7 Install on Redhat w/ Apache - sites/default/files is not writable

I have spent numerous hours on an issue that has left me puzzled. I am attempting to install Drupal on Linux Redhat using apache, but it will not allow me to pass step 3 due to the fact that sites/default/files is not writable.
I have followed the instructions on Drupal's site, in their install.txt file as well as the instructions of others who have had the same error with no success.
I have granted permissions access all different ways root:root 777, root:apache 777, I have verified that apache is the user running the apache process and I am still stuck.
Note: I was able to complete the install on windows.
Any new ideas?
Okay, so after following directions from both official and non-official web sources, the one thing that was never instructed to do or try was to reboot the application AFTER making permission changes to the files directory. I tried it, and this solved the issue.
This is weird because I've never had to reboot an OS after making permission changes on a directory. Additionally I did restart httpd after each change thinking that would be sufficient. Hopefully this can help anyone else running Redhat 7 with the same issue.
Thanks, TH
I solved this problem by changing the security context of the directory "sites".
My Drupal core files are in: /var/www/html/drupal
Then I applied the command:
chcon -R -t httpd_sys_content_rw_t /var/www/html/drupal/sites/

How to Install OpenCart in subdirectory?

I have a godaddy web hosting, with more domains. Let's say shopping.com points to shopping folder. After installing OpenCart I can see no .htaccess.txt file in order to edit RewriteBase /. And while accessing the web page it redirects me to install which lets me upgrade. I tried downloading a default OpenCart .htaccess file from web, but then I get 403 error. Anyone knows what could be the issue?
I had to chmod 755 .htaccess as the server did not have access to the file.
Hope it helps someone else to solve their issue.

Drupal does not recognize my website has been installed

After a successful Drupal install, I was trying to follow the security recommendations and reverted the settings.php file to 444 permissions (read, read, read). Then, all of a sudden, right after doing that, Drupal does not recognize the installation process was completed. It went back to the install screen. Worst of all. I did chmod back to 666 (write, write, write) but it does not work any more.
When I move forward as if I was going to install Drupal again, he tells me he does not have permissions to create the files folder under sites/default... But since the installation has already been completed... the files folder is already there... I am puzzled... Could it be some sort of server caching? Since this is one of my first adventures with a Linux server, I am a bit confused. Any help appreciated... Thanks.
Check your folders permissions there's settings.php...
I found the problem to be that when I changed the settings.php file permissions to 444, I also changed the sites/default folder permissions to 444. After I realized there was a problem, I changed it to 666, but it still wasn't working. The web server could not see anything inside that folder. Then finally I have set it for 755 copying other folder''s permissions... Bingo! works normally.

Resources