How to remove "public" from the root directory access link? - redirect

i'am new to the hosting/c-panel stuff, and i got a laravel based app installed on my godaddy hosting, the problem is that the application require some files that are placed on the root directory of the server for example http://server.com/images/ajax-loader.gif and the file is placed just there
but when i type the link http://server.com/images/ajax-loader.gif it doesn't find it:
so i need to add a public like http://server.com/public/images/ajax-loader.gif like:
the problem is that the entire app needs to be modified to add a public for every file like that, so is there any way i can access the root folder without adding this /public/ ?

Have you contacted the hosting provider? Usually, they help with these kinds of issues.
Do other images from your 'images' directory load fine? If all images in the images directory do not load in the browser, that indicates either a permission issue or some .htaccess settings. Again needs to be checked at the hosting provider end.

Related

Deploying my website on firebase doesn't create .json file

This is the message I get when I go to view my website after completing hosting setup.
Welcome Firebase Hosting Setup Complete You're seeing this because
you've successfully setup Firebase Hosting. Now it's time to go build
something extraordinary!
I've done the following (per firebase support):
Run the command, firebase use to make sure the local config is pointed
to the correct Firebase project.
I've made sure that an index.html file is present.
However, I've not been able to do this (per firebase support):
I can't check the firebase.json file to make sure the public folder
(or public attribute) is the same as the location of your hosting
files.
It's because it looks like firebase init failed to create the firebase.json file as they are not in my root directory, so I'm suspecting this to be the problem.
I'm deploying from VS Code, please.
How can I get that file created? I am scheduled to launch this site tomorrow and I can't get any further responses from support (presumably it's cos of the weekend).
Many thanks for any help.

How can i change path to Laravel project?

Change web root path to a website with crudbooster and Laravel
so, i have a website and the cms behind was done with crudbooster and larvel. when the website was created, the path for it was: /webroot/domainA/site/site/
I want to move this to /webroot/domainB/site/site but when i`m changing the path, whole website is down and not working unless i change back the original path to /webroot/domainA
Where can i change the path of the website to be the one I needed?
domainA - developer server
domainB - client server
This was a fiver.com project, and the person who did it not responding to my emails.
Go to the .env file and change the APP_URL

Deploying a Static website on Server

I am trying to built a static website using godaddy server. I created a folder say Manage inside public_html in which there is an index.php. Now when I am trying to open this page on browser with URL "www.mysite.com/Manage/index.php" It is showing error, File not found, 404 error. So what possible error I might be making?
There could be a few reasons. If you are using an RHEL-based distribution for your server, you need to edit the master Apache configuration file /etc/httpd/conf.d/userdir.conf and change two things:
Change UserDir disabled to UserDir disabled root
If #UserDir public_html is commented change it to UserDir public_html
This tells Apache that the directory containing each user's html files is a subdirectory of their home directory called public_html.
You may also need to change the permissions of your user directory and your public_html directory to allow Apache to read and execute inside them. To do this, run the following commands:
sudo chmod o+x /home/myusername
sudo chmod o+rx /home/myusername/public_html
Restart Apache and see if it works.
The source for this knowledge is not my brain. It comes from the wonderful course at Washington University in St. Louis CSE 330 Rapid prototype development.
At first look to error.log. If you use nginx find in /var/log/nginx, if httpd in /var/log/httpd.
And what do you mean about "static"? PHP preprocessor generate html from *.php files, so you index.php is not static.
For this case you need to setup LAMP stack.

Zend Framework Setup on Hostmonster?

I have created a project locally using Zend Framework 1.11. I have spent a long time learning the basics of the framework from all the online tutorials I can find, and I now feel fairly comfortable using the ZF Tool and locally working on my project on WAMP. I decided it was time to upload my project and deploy it on my shared hosting server, which happens to be Hostmonster.
After uploading my project, I have been struggling to get it to function correctly on the remote host. I have successfully uploaded my Zend Framework Library and included it in my PHP.ini, and all tests show it is seen by the server.
My directory structure, which was originally created to the standard format by the ZF Tool locally on the command line, is not pointing to the same paths on the remote server, so everything was messed up when I navigated to the Project/public folder. After much more Googling, I found several posts by various bloggers related to modifying .htaccess files, etc., which resulted in all my other sites hosted on the server being disrupted.
The closest I have been able to come to re-creating my initial local site on the Hostmonster host is by:
Taking all the directories out of my "public" ZF folder, and putting them directly in the web root of my server, (public_html), and:
Changing the 'APPLICATON_PATH' of my index.php file from the ZF public folder with the path to my ZF library (changed to reflect where it is in relation to the new location).
With this (tedious) setup, I am now seeing my index view being rendered with all CSS and Javascript, but I am unable to navigate to any of the other views, and the form I have displayed via a view script is likewise not showing up, only the index view is rendered.
My Zend Framework Library is located in a directory in the web root-- public_html, with the php.ini adding it to the include path.
This is becoming very frustrating as I like a lot of the features of ZF, but the restructuring of the site is proving impossible. If anyone has instructions or experience with this setup, I would greatly appreciate it. I am also hosting multiple other sites on this server, so I'm hoping I don't have to change from the single php.ini configuration(5.3) I'm currently using or mess around with a bunch of .htaccess files.
Thanks for any help anyone may have!
I have ZF running on HM no problem. Just place your index.php and .htaccess in your public_html dir, and what I did was created a public_html/zend/library folder and in my index.php including that library to get things working.
Also what do u mean you're running other sites off this server? Are you serving the application on the root of your domain? ie in your http://domain.com/ path? or different subdomains?

Deployment Issue In Symfony2 - Can't Find Registered Bundles?

I'm transferring my project from the laptop to a test/production server. I'm copying the files to the server via FTP. So far, I can access the /web/config.php file and /web/app_dev.php files alright.
However, when I go to try and load a page it comes up with the following error:
ReflectionException: Class Knp\Menu\ItemInterface does not exist
In the error report, all the files look to be held in the following root directory:
/var/www/vhosts/domain.co.uk/subdomains/dev/httpdocs/
On the laptop however, the root directory was www:
C:\wamp\www
Everything on the test server is held in the httpdocs folder. What do I need to do to fix this error?
Cheers
EDIT:
I have moved everything in to a www folder, held within httpdocs folder. It's completely broken doing that, no pages will load.
The issue occured from an incorrectly configured .htaccess file on the development server.
During the configuration, the root directory wasn't changed to /web. Once this was changed however, the plugin worked.