When I tried to access my localhost my IP like 192.168.1.7 then its working fine and show me all my project dir but when I try to access my project dir then IP turn to localhost so I can't access this address on different system. so how I can keep the IP same?
I have already tried some solution but it doesn't work.
I need to access my project like http://192.168.1.7/myproject
It seems your project has hard-coded code piece or website location is written in a configuration file.
Here your check list can be to solve this issue:
Check your project files and search if any file consist localhost string anywhere
Check .htaccess if it exists and see if there any localhost text
If you find any you can use $_SERVER['HTTP_HOST'] instead of hard-coded text. $_SERVER['HTTP_HOST'] will make it dynamic so it shouldn't be problem for you anymore.
Please give us more information about your project. We can't go further and help directly to your problem since we don't know so much details about it.
Related
I am running ContentBox on Lucee using CommandBox. In my ContentBox Admin, when I first set it up, I had it running on 127.0.0.1. Later, I created a web.config and updated the host file to use mydomain.com (I am using mydomain.com here as an example. The actual domain name is different). I have restarted the server a few times and even re-initiated a few times. However, cb.siteBaseURL keeps returning 127.0.0.1. My question is, where is cb.siteBaseURL getting the URL from? While I might have overlooked, but I have looked at every field in both Settings and Geek Settings and I don't see anything that have to do with the base URL.
NOTE: I wish I could tag ContentBox. However, it does not currently have a ContentBox tag. To create a new tag, I need 1500 reputation, which I don't have. So, Lucee, CommandBox, and ColdBox are the best ones I can come up with
First of all, we have a dedicated community forum for ContentBox here: https://community.ortussolutions.com/c/communities/contentbox/15
The issue you are experiencing is because ContentBox is multi-site. So each potential host needs to be mapped to the domain in question. Each site has a base url that you must define in order to build links and execute things. So when you install ContentBox, we have no clue which domain you will attach it to, so it defaults to the 127 ip address.
So now that you have a domain, just go to the Sites and update the base url to your domain.
I've just recently installed CF11 on a new machine but I'm encountering the below issue when trying to navigate to the localhost directory in a browser.
On my previous machine which was using CF10 I was able to get the directory listings and navigate through folders to specific pages so is it some setting that I am missing?
I can navigate to CFAdmin okay and have added a whole range of aliases in my server.xml file which I can navigate to, as well as adding the CFIDE and WEB-INF ones.
As an aside, I also seem to get that silly 404 badge in front of CFs debug output when I try and navigate to a page that doesn't yet exist. Is there a way to switch it off?
If you need more details let me know.
Thanks in advance
I want to have an offline website (no intention to make it available outside the LAN), to handle several pictures in my user picture folder (and they have to stay where they are), but the thing is that I dont know if I can access them from WAMP, as it's outside the folder hierarchy.
Also thought about another solution that maybe exists some webserver for PHP, like what SQLite is for SQL, lightweight standalone program that doesn't need any installation, and that can be placed anywhere.
Thanks in advance,
any help would be very apreciated :)
There's a few ways to can go about this:
Use Mod_Rewrite to direct URLs from something like '/pictures' to the location of the pictures, see
http://httpd.apache.org/docs/2.4/rewrite/remapping.html
Change the document root of the apache server in httpd.conf to the location of the pictures (probably not what you want)
Add another virtual server to apache and set its document root to the location of the pictures
(again, probably not what you want but thought I'd suggest it)
Add a symbolic link, not quite sure how it would work (if at all) in Windows but again, something you can look at
I've just installed WAMP and MediaWiki on a different box (a local machine on my network) however I want to view MediaWiki through my local machine and then add articles, etc. I installed MediaWiki on the remote box and configured it, I then returned to my local machine, typed in the IP address of the MediaWiki on the remote box (hsomething like http://100.100.100.100/wiki/index.php/Main_Page) and noticed that when changing preferences and saving the URL uses localhost and not the IP address (basically after I have posted via a Form Submit). Is this a setting I can change in WAMP or is it a setting I'll have to change in MediaWiki?
You may have noticed I'm a bit of newbi to this kind of thing.
Many thanks
There is a configuration file named localsettings.php in wamp/www/wiki
Open it with notepad and carefully remove the following:
$wgServer = "http://192.168.0.1"
(where 192.168.0.1 is the host name you used)
Stop and start WAMP and it should work
Panic over, in the LocalSettings file for mediaWiki you can set the following $wgServer to your IP address.
anytime a user logs into our Wiki they get the following error: "This Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again." Even though the error displays, the user is actually logged in and can make edits as normal. If the user doesn't look closely they can't tell they are logged in and it's causing confusion I would be glad if anyone gives me a hint
Wikimedia's advice is Check to make sure PHP's directory for storing session data is writable. This directory can be found in the php.ini file under the session.save_path setting. Errors in this php.ini setting can also cause other problems.
... (and) make sure the Internet Guest Account (eg. IUSR_FOOBAR, nobody, or apache) has write permissions to the folder listed in the session.save_path variable of the php.ini file.
Source.
If you are using a hosting site you need to edit your php scripting configuration (php.ini). The page should have information on your web document root. If there is already a "tmp" folder created then use it. If there is not a tmp folder in your current set up create one that is NOT browseable by users and tell the php.ini file the location as directed above.
For future reference... We just had a similar problem on Appropedia (same error, but couldn't log in at all). It turned out the temp directory was full. Cleared the temp directory, problem solved.
It turned out the temp directory was full
In my case it was because the entire partition was full, needed more space.
Problem I just had was due to default install of our PHP using C:\windows\temp as a base folder for PHP session and other data.
Of course, once someone empties out the temp folder because its full of junk .... the sub-folders for PHP information go with it too :\
If you are using NGINX + PHP-FPM the previous answers will likely not be of any assistance.
From the command line, run:
php-fpm -i|grep --color cookie_path
See what your cookie_path is, then stat the folder and ensure your php-fpm user has write access to it.
To resolve this issue using Nginx and Php-Fpm, I had to change my cookie_path from it's default of / (seriously, why would this be a default?) to /tmp.
After restarting nginx and php-fpm, it works perfectly.