I have Code Igniter based site and I have it on ubuntu 12.04 in /var/www/mysite folder
My ubuntu serves as a server so I access my site trough other computer, but both computers are on LAN network. I use http://xxx.yyy.zzz.ttt/mysite url to access it.
The problem I have is that I cannot use url without "index.php" in it.
So I have http://xxx.yyy.zzz.ttt/mysite/index.php/phpinfo To acces my controller phpinfo instead of http://xxx.yyy.zzz.ttt/mysite/phpinfo
I have cheked well that mod_revrite works well with this here
And also checked that the folder, files and subfolders in mysite have all 777 file permissions.
I also added all necessary rules in .htaccess file but still no success
Any idea what is causing this.
The first thing I would do is make sure you followed all of the CI instructions.
It may be that you did not update the config file to be a blank string rather than using index.php
Do you know what was the issue.
The default file in sites-available had option
AllowOverride None for /var/wwww
I set it to All and it worked out. :)
cheers :)
Related
So i have Ubuntu 16.04 with apache2 installed on it, and my local sites are inside if /var/www/html/ directory.
The problem is that one of my sites based on magento 1.9 redirect me to wrong url everytime. Whenever i'm trying to access localhost/my-site/ it redirects me to localhost/my-site/localhost/my-site/ instead.
I have tried to change .htaccess and even deleting it from site root folder same as changing apache2 hosts configurations inside of apache2/site-available folder and even creating new virtual host in that folder but that didn't helped.
I also tried to fully reinstall apache but no result. My hosts file has just localhost defined now so it can not be conflict with other host.
I think that it replace index.php url part with localhost/my-site but i have no idea how to fix it.
I would realy appreciate some help becose i'm trying to fix this few day already with no result.
Thanks.
Ok, I have solved this problem, by deleting cache folder on my local pc in /var/tmp directory. Apparently this cache was saved when i got redirect first time and after that i was redirecter becose of this.
Hope this will help someone.
https://github.com/kokspflanze/PServerCMSfull
^ I've been trying to install this website since 2 days, and I've done everything mentioned there properly, I dunno if I should do extra steps/modifications to the files. First, localhost was working fine but the when I surf localhost/pservercmsfull I see the directory files/folders but not the site content, a screenshot to explain what I meant: http://prntscr.com/7vuu4x
Then I've checked httpd.conf again and found a typo, I've fixed it then localhost started saying the following; Forbidden
You don't have permission to access / on this server.
Thanks for reading, if you know any possible solution/something I should do but not mentioned in github, please let me know what is it and some hints to do it.
you have to set the DocumentRoot to the public directory, that is the current problem.
i write this steps there https://github.com/kokspflanze/PServerCMSfull#step-3-configuration-for-apache
The simple solution is to either rename 'init_autoloader.php' to 'index.php', or to create a new file called 'index.php' which consists of the following:
<?php include_once('init_autoloader.php'); ?>
In your Apache2 vhosts file, there is a parameter called 'DirectoryIndex' which defines which filename to render, if present, instead of showing the directory listing. More information on that can be found here.
We recently have adquired the credentials to fully play with our website hosted outside.
So we need to mount it locally on a XAMPP stack to fully deploy the site and asociated database.
It've been already done, and everything seems to work properly except for the images in the site.
It is a DRUPAL site. Some images are "full path coded", so they work as we can expect, but major of them are just relative path coded.
Now, I've everything mounted on localhost. Let's say the folder with the site it's called "web".
Then i've everything on:
c:/xampp/htdocs/web/.......
So I access to it via: http://localhost/web/
I've tested that all the non viewing images, if I append the "http://localhost/web/" on the 'src="/site/..."' they are accessible and look right.
So, is there a way to via .htaccess add the "http://localhost/web/" on those URLs who hasn't it? It doesn't only happens with images, it's just related with all the links, urls, srcs, whatever which is just "relative pathed".
I've already tried the "RewriteBase /web", but it doesn't work.
Need help to solve this so, please.
In summarize, the site online is just mounted on the root, so everything works, fully or just relativetly pathed. But in my case, I've got the development site inside a folder, so I need it to work too!
Much appreciated.
If this is a Drupal 7 site (might work for Drupal 6) make sure you have a tmp directory set. Go to admin/config/media/file-system and look for the temporary directory. Also confirm that you have this directory on your root, which for XAMPP is the htdocs folder.
This might be a file permission that can be caused by incorrect .htaccess settings (This link may help: https://www.drupal.org/node/2140629) in the folder set as your temporary directory.
This may also be a document root error. You can change that by editing the DocumentRoot setting in C:\xampp\apache\conf\httpd.conf.
This stackoverflow link may help if none of the above suggestions bear fruit: https://drupal.stackexchange.com/questions/30113/configuring-the-temporary-directory
I have moved a magento site rackspace windows cloud server to another windows server that have plesk installed.
After migration I have changed my base URL from core_config_data to plesk site preview link and deleted all files from cache folder, Now when I am trying see my site using plesk site preview link firefox giving The page isn't redirecting properly error, on Chrome giving This webpage has a redirect loop error.
I have checked my plesk preview link with other files and see link is working fine but only magento not opening.
Any one know how to fix this?
URL Rewriting depends on your .htaccess file, so there are a couple of things to check:
web/seo/use_rewrites in core_config_data should be true.
when you created your tarball, did it include . files in the root directory especially .htaccess?
If you used tar -cvf archive.tar * then it may have missed them. (Nice "feature" of *nix).
Check that your httpd.conf has AllowOverride All, otherwise your local .htaccess will be ignored.
Did you changed both of "web/unsecure/base_url" and "web/secure/base_url"? if you changed only one - it can be not working.
I read the docs and installed lithium exactly like they have explained but I keep on getting a 403 forbidden error. I am new to apache and php and I have been spending two full days trying to make lithium work. I am running apache 2.0 on osx lion and here is what I did:
1- I created a new directory called my_app in localhost/~marwan/
2- I extracted the sample lithium app in to that directory.
3- I downloaded the lithium framework and extracted it into /libraries/lithium/
When I access http://localhost/~marwan/my_app/ I get the following 403 error:
You don't have permission to access /~marwan/mj/ on this server.
I have researched and added Options +FollowSymLinks to the .htaccess file and the error changed to:
You don't have permission to access
/Users/marwan/Sites/my_app/app/webroot/webroot/ on this server.
I have tried to add Options +FollowSymLinks to every .htaccess file but nothing changed.
I dont know if this is relevant: websites on localhost/~marwan/ work but localhost also shows a 403 error. I tried to fiddle with different permissions posted in previous answers but with no luck.
Thank you for your help.
httpd.conf file is here http://pastebin.com/jLwHPbuq
Edit:
httpd-userdir.conf is here http://pastebin.com/ZXi51pn7
httpd-vhosts.conf is here http://pastebin.com/3xqRmrzL
Update
The lithium project works when I remove the .htaccess from the main folder but it doesnt work properly because rewriting doesnt work. Here is the .htacces in the project root http://pastebin.com/vt0fVyyL
The path you provide in the error message /~marwan/mj/ and the path you provide that you are trying to reach http://localhost/~marwan/my_app/ do not match. According to the error the web server says you are trying to access a directory called mj while your url does not include mj so unless you are doing some URL rewriting this looks like an issue.
Also, just to be clear, when you say you installed the library in /libraries/litium you mean relative to the web root path, correct?
OK, looking at your conf files you can serve files out of /Library/WebServer/Documents or out of ~/Sites (that tilde represents your user directory so it is the same path as /Users/marwan/Sites)
Do this...
In /Library/WebServer/Documents place a file called index.html and have it output some text.
Make sure there are no .htaccess files in /Library/WebServer/Documents.
Make sure you have not modified your httpd.conf file in any way from its default settings.
Do you see the correct behavior for your index.html (you should)? If not, what happens?
I looked at the error log after restarting apache and found DocumentRoot [/usr/docs/dummy-host.example.com] does not exist so I fixed it by using this answer stackoverflow.com/questions/6671042/… and now it works.