Php localhost vs 127.0.0.1 vs file:/// behave differently
I set up php to do web development on my MBP 10.5.8 following this guide http://foundationphp.com/tutorials/php_leopard.php and things are working... sort of. The issue I'm having is that when I load pages in Safari using localhost, 127.0.0.1, and directly from the harddrive using file:/// i get different results when php posts the changes to an xml file.
here are the results
edit localhost post results reload local host displays old results, file and 127.0.0.1 display new
edit file post results reload no change to file, local host or 127.0.0.1
edit 127.0.0.1 post results reload 127.. and localhost display new data, file does not.
Sometime I have to reload 127 and the new data is not there, I load localhost and the new data is not there, but when I reload 127 again the new data is there.
I only have one copy of the htm file and one copy of the xml file. This has to do with how the server is set up or operates somehow. I don't understand how the localhost path can keep loading the old data when then new data is in the xml file.
localhost and 127.0.0.1 both resolve to the apache entry page when I put them in with not additional path information.
Can anyone explain why this is happening, and how to resolve it.
Yes. It runs fine on my unsupported G4 450 MP which I used to beta-test the cat. See these for installation work-arounds:
http://www.macosxhints.com/article.php?story=20071214143723301
http://www.tidbits.com/webx?14@@.3cb6ddd5/5 and
http://forums.macrumors.com/showthread.php?t=371302
Similar Messages
-
Mail.app no longer connecting to localhost or 127.0.0.1 port 143
Gentleones,
Problem:
Mail.app cannot connect to localhost or 127.0.0.1 on port 143 in order to use an SSH-tunnelled connection to my IMAP server. It gripes that "The IMAP server '127.0.0.1' is not responding."
Background:
I occasionally have to connect via SSH tunnel to my mail server at home to access my E-mail via IMAP and Mail.app. While I have done so for several years, within the last two weeks, something has happened that no longer allows me to do so. (I think the triggering event was upgrading the client machine to 10.4.7, but I'm not positive.)
Troubleshooting done to date:
I can successfully open the tunnel and use TELNET to login to my server on the IMAP port, 143.
I installed the latest version of Eudora and it connects to the tunnel successfully.
I have deleted both the com.apple.mail.plist and both ~/Library/Mail and ~/Library/Mail Downloads folders, but that hasn't made any difference.
Anybody got any idea what is going on here?
Thanks,
Bill
Dual G5/2.5 Mac OS X (10.4.7)You're welcome.
How the heck did you figure that one out?!
I didn't, actually. Someone else in this forum (and probably other people in other forums as well), figured it out by looking at the changes introduced by the Mac OS X 10.4.7 Update, and checking his/her own settings accordingly:
About the Mac OS X 10.4.7 Update
Re: Mail problem in 10.4.7 -
MAM 2.0 in WM5 (localhost vs //127.0.0.1/)
We've been using ME 2.1 and MAM 2.0 in PPC 2003 for almost a year without any problems.
But now, we are trying to user new PDas with Windows Mobile 5, but are having problems in using them:
We made the download of the adequate JVM from NSIcom, and tried to install the application.
It seems that WM5 does not resolve //127.0.0.1/ to activate the ME.
We've tried using //localhost/ in Pocket IE and it seems to work, allowing us to install the applications (MAM).
However, we still have problems: Wen we try to access MAM we get the message:
[code]Error: 500
Location: /MAM25/home/home_mgmt.do
Internal Servlet Error:
javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException
at org.apache.tomcat.facade.RequestDispatcherImpl.doForward()
at org.apache.tomcat.facade.RequestDispatcherImpl.forward()
at org.apache.jasper.runtime.PageContextImpl.forward()
at mam_0005fstart._jspService()
at org.apache.jasper.runtime.HttpJspBase.service()
at javax.servlet.http.HttpServlet.service()
at org.apache.tomcat.core.ServletWrapper.doService()
at org.apache.tomcat.core.Handler.service()
at org.apache.tomcat.core.ServletWrapper.service()
at org.apache.tomcat.core.ContextManager.internalService()
at org.apache.tomcat.core.ContextManager.service()
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection()
at org.apache.tomcat.service.TcpWorkerThread.runIt()
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
at java.lang.Thread.run()[/code]
this seems to be a result of the inability of WM5 to resolve //127.0.0.1/
We've found the following article for PPC 2003 (in spanish), that shows how to make PPC2003 resolve "localhost" correctly:
<a href="http://www.microsoft.com/spanish/msdn/articulos/archivo/261104/voices/migration_developers_faq.asp">http://www.microsoft.com/spanish/msdn/articulos/archivo/261104/voices/migration_developers_faq.asp</a>
Does any one know of a similar fix for Window Mobile 5?
(the full text is shoewn below in this message)
What is necessary for PPC2003 to resolve 'locahost' correctly?
If you are having problems using Pocket PC's HTTP server or when connecting to a "localhost" with a PPC 2003 based device, you may need to configure tour device in the following way:
Create an acrchive named _setup.xml with the following content:
[code]<wap-provisioningdoc>
<characteristic type="CM_Mappings">
<characteristic type="536870911">
<parm name="Pattern" value="://localhost/" />
<parm name="Network" value="{e8e89f5a-d3bb-4c58-9b4e-08279d31044e}" />
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic
type="HKLM\Software\Microsoft\ConnMgr\Providers\{EF097F4C-DC4B-4c98-8FF6-AEF
805DC0E8E}\localhost-null">
<parm name="DestId"
value="{e8e89f5a-d3bb-4c58-9b4e-08279d31044e}" datatype="string" />
<parm name="Type" value="0" datatype="integer" />
<parm name="Enable" value="1" datatype="integer" />
</characteristic>
</characteristic>
<characteristic type="CM_Mappings">
<characteristic type="536870911">
<parm name="Pattern" value="://127.0.0.1/" />
<parm name="Network" value="{e8e89f5a-d3bb-4c58-9b4e-08279d31044e}" />
</characteristic>
</characteristic>
<characteristic type="Registry">
<characteristic type="HKLM\Software\Microsoft\ConnMgr\Providers\{EF097F4C-DC4B-4c98-8FF6-AEF805DC0E8E}\localhost-null">
<parm name="DestId" value="{e8e89f5a-d3bb-4c58-9b4e-08279d31044e}" datatype="string" />
<parm name="Type" value="0" datatype="integer" />
<parm name="Enable" value="1" datatype="integer" />
</characteristic>
</characteristic>
</wap-provisioningdoc>[/code]
Create a cab file with this info
place it in the device and activate itHello Rogério.
I heard that there is no fix available at the moment and that Microsoft will ship a fix with the next major release.
Here are two links to find more information:
http://blogs.msdn.com/cenet/archive/2005/06/06/425799.aspx
http://groups.google.de/group/microsoft.public.pocketpc.developer.networking/browse_thread/thread/43526db5984b5666/20c6f6e14c5ebc08?q=localhost&rnum=1#20c6f6e14c5ebc08
Regards,
Sascha -
Localhost isnt 127.0.0.1 after Migration Assistant
Hello.
After I used Migration Assistant, when I refer to localhost in many development tools (NetBeans, PostgreSQL, Power Architect, ...), my current ip address is returned (this ip was obtained by DHCP server) instead 127.0.0.1. In my old Mac there was no such problem.
Someone has a clue?
Thans in advance.Try the developer forums under OS X Technologies.
-
Unable to open php localhost web page
I 'm web programmer, i want to test my localhost website on Firefox browser, i tested my website before on Opera and internet explorer, test finished successfully, but when i test it on Firefox i faced the following error message:
Error message: Connection Failed
Note:
Apache version: 2.2.11
PHP version: 5.3.0If I open http://localhost:7001/xlWebApp At browser getting following error.
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. -
Cannot access localhost through 127.0.1.1 or 127.0.0.1
I'm having problems with a local installation of Magento and apparently it's caused by using the localhost address.
Apparently it works using either 127.0.1.1 or 127.0.0.1
But I cannot access localhost with either of these addresses!! 127.0.1.1 times out and 127.0.0.1 simply cannot connect.
I've checked my hosts file and it reads:
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
Which appears to be correct? I even tried setting up my own address but that didn't work either.
Does anyone know what might be wrong??
Thankspealo86, it looks as though there are a few leading number-signs missing from the comments of your /etc/hosts file.
If you open a Terminal window and run the command *openssl dgst -sha1 -c /etc/hosts*, is the output from that command
SHA1(/etc/hosts)= 51:6f:ee:54:30:1d:8f:ea:57:72:39:60:2a:cf:dd:3b:d0:62:e8:88
If so, then your /etc/hosts file is fine, and the copy of it in your post just lost a few leading number-signs between copying and pasting.
If the output is different, though, then you’ll want to edit it to make sure that there are leading number-signs on the second, fourth, and fifth lines (as were there originally).
I hadn’t heard of localhost ever being equated to 127.0.1.1; its traditional value is 127.0.0.1, as your /etc/hosts file shows.
From within the Terminal window, try the *ping -c 3 localhost* command; are the first lines of output something like
PING localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.045 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.069 ms
(The times at the end of each line will vary.) If so, then localhost is perfectly accessible at 127.0.0.1. -
PHP Code: Using a variable to name the file in an Include
I have a series of case statements assigning a value to the
variable $theme
based on the current month. Then I have a set of files
(january.txt,
february.txt, etc.). The variable values are those file
names:
// get current month as a number
$month = date('n');
// select theme for the month
switch($month) {
case 3:
$theme = 'march.txt';
break;
case 4:
$theme = 'april.txt';
break;
[etc.]
What is the correct syntax for a PHP Include that will use
the current value
of $themes for the filename?
Thanks
Walt<?php include('_inc/'.$theme); ?>
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Walt F. Schaefer" <[email protected]> wrote in
message
news:gqutqv$qbf$[email protected]..
>I have a series of case statements assigning a value to
the variable $theme
>based on the current month. Then I have a set of files
(january.txt,
>february.txt, etc.). The variable values are those file
names:
> // get current month as a number
> $month = date('n');
> // select theme for the month
> switch($month) {
> case 3:
> $theme = 'march.txt';
> break;
> case 4:
> $theme = 'april.txt';
> break;
> [etc.]
> What is the correct syntax for a PHP Include that will
use the current
> value of $themes for the filename?
>
> Thanks
>
> --
>
> Walt
>
>
> -
Use PHP to convert html page to a pdf file for email
I want to use my php scripts to send an email (with a pdf attachment) of the web page that is being viewed.
My problem I have no way to convert the html page to a pdf file without the end user being prompted to (1) naming the file (2) saving it
Is there a program or a way i can save the html as "auto_name.pdf" file on the server without user input?
I have Adobe Acrobat 6.0 Professional on serverThere are lots of good Html to Pdf conversion tools for developers, both free and paid. I'd suggest to take a look at PD4ML Html to Pdf converter - it has lots of features (CSS support, page layout presets, etc.) and can be obtained for free for non commercial usage. There is also a topic at Stackoverflow with a list of such converters.
-
PHP disaster with entropy installation need help with file location
I have a mac mini snow leopard server running 10.6.5 ,and I was trying to resolve a mcrypt module issue so that I could install wordpress and magento on some of our sites.After doing what I thought was extensive research, I decided to download the entropy php 5.30-3pkg from Marc Liyanage since it was already compiled and had an automatic install.I had the xcode tools installed and was going to attempt to compile it myself,but did not quite understand the instructions on Michael Gracie's site.When I installed the entropy package it told me that i needed to first disable the existing module,and I attempted to uncheck the php5 module,with no luck,as every time I tried to save it it rechecked itself,which I later discovered was happening because of dependency issues, as I had the mail,wiki,etc services on the sites checked. So my problem is that I wasn't aware at the time of the dependency issue,and I just renamed the module and the file name by putting a # in front of both (Inside the server admin dialog box through the pop up window).I didn't think it would hurt since is was going to be disabled,but now i get blank pages when trying to connect,and can't even see a test.php file, nor can I even locate where they say:
software is supposed to be installed into a new directory /usr/local/php5 on my boot volume. If you ever want to get rid of the package, you only have to remove this directory and a symbolic link called +entropy-php.conf in either /etc/apache2/sites or /etc/apache2/other, depending on whether you run OS X Client or Server.
Any help would be appreciated !Thank you so much, that works just like i wanted it to as it downloads the file but then i have the problem of the file being called firename.png (or whatever i put in there instead)
using this i changed the code and made it this instead which works 100%
set download to text returned of (display dialog "Enter IGN" default answer "" buttons {"Download", "Cancel"} default button 1)
set the destination to (choose folder)
do shell script "curl -L http://minecraft.net/skin/" & download & ".png" & " -o " & quoted form of ((POSIX path of the destination) & download & ".png")
so i used the input name again with download and added a .png for the extention and now it downloads the file to the locaiton i specify with the name of the user im entering with the correct exention, 100% awesome ^^
Thank you everyone who help me with that issue, grately appreshiated -
Hi, I read
https://bbs.archlinux.org/viewtopic.php?id=130197
and I have similar problem, after last update to latest version, I can not open any video file, the crash report is here
/usr/bin/mplayer -noquiet -nofs -nomouseinput -sub-fuzziness 1 -identify -slave -vo xv, -ao alsa -nokeepaspect -framedrop -nodr -double -input conf=/usr/share/smplayer/input.conf -stop-xscreensaver -wid 31457311 -monitorpixelaspect 1 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -ass-styles /home/ja/.config/smplayer/styles.ass -fontconfig -font Arial -subfont-autoscale 0 -subfont-osd-scale 20 -subfont-text-scale 20 -subcp ISO-8859-1 -subpos 100 -nocache -osdlevel 0 -vf-add screenshot -slices -channels 2 -af equalizer=0:0:0:0:0:0:0:0:0:0 -softvol -softvol-max 110 /home/ja/Video/Wham! - Last Christmas.mp4
/usr/bin/mplayer: error while loading shared libraries: libwbclient.so.0: cannot open shared object file: No such file or directory
and I have libwbclient-3.6.3-2 installed.
Any help is appreciated.
Last edited by dubria (2012-03-04 13:33:17)Same problem here... I finally updated whole system yesterday (last full system upgrade was on 2011-11-26) and same problem appears. File /usr/lib/libwbclient.so.0 was not present in system, so i reinstalled package smbclient - without any effect, then reinstalled libwbclient package and requested file appears. There is no error about upgrading libwbclient in pacman.log (from yesterday system update).. How is this possible?
-
Howto install/run MI 7.0 within WM6.1
Hello
I am a newbie to SAP and normally doing support for a device manufacturer. I had to support the install of MI 7.0 last friday and found a very irritating failure.
I then started a test scenario with Mobile Device Emulator and a Mobile 6.1 Prof. Image. Dont care about that, it is just a standard Windows Mobile device running on an emulated ARM processor.
First I installed CrEme327c_AX_CE42_PPC_minimal.CAB and then MAP70_WinCESetupTomcat_Tomcat.CAB. Then I did a warmboot (soft reset) and was presented with a dialog saying that MI will be started by CrEme. At the end Pocket Internet explorer opened up with "http://localhost:4444/me/servlet/com.sap.ip.me.apps.jsp.LoginServlet" but unfortunately with an html error page:
"You are not authorized to view that page"
I then changed localhost to 127.0.0.1 and got a different error. The Windows Mobile Connection Manager states "Cannot connect with current connection settings. To change your connection settings, tap Settings: [Settings]" and Pocket Internet Explorer shows the html error page 'Action Canceled'.
What I am doing wrong?
I then tested the adress http://localhost:4444/me/servlet/com.sap.ip.me.apps.jsp.LoginServlet in Access Netfront, an alternative Web browser for Windows Mobile. With Netfront 3.5 the Login Page shows as awaited.
There is something really wrong with the startup adress and PIE.
Can you explain?
thanks
JosefHello
yes, I know, WM6.1 is officially not supported. Yes, I know, there are no differences in between Windows Mobile 6.0 and 6.1, nothing that should MI prevent from running. Yes, I know, there is a big difference in between Mobile 6.0 and 6.1.4, as this release will have a new internet browser engine.
I did as adviced and installed CrEme 3.29 for MI7.0. As I awaited, there is NO CHANGE. This problem does not look like a problem of CrEme or MI. As I wrote, Netfront does not have a problem. It is the built in Internet Explorer Mobile that is NOT able to open localhost or 127.0.0.1.
I already have installed emulator device manager and ActiveSync. I am doing programmers support for C#, Java, C/C++ and Windows Mobile and Windows CE devices all the day.
regards and thanks so far
Josef -
Can't define CF server in Builder
On 64-bit Windows Vista machine
CF 9 wouldn't install 64-bit version - threw Windows 216 error
Installed CF 9 32-bit over typical IIS 7 server
127.0.0.1 and localhost both serve from c:\inetpub\wwwroot
CF templates in iis web sites execute normally
Installed Coldfusion Builder as stand alone
Going through Builder's Server Wizard, I can't find documentation to help me complete the process. Most help will provide specific examples for each field or check box, but they don't explain the why. So, when a problem arises, there is no explanatory information for troubleshooting.
Server settings under Server Setup:
Server Name: localhost
Application Server: Jrun
Host Name: localhost
"Is Local
WebServer Port: 8500
RDS User Name: admin
RDS PW: as entered during CF9 install
Server Home: C:\Coldfusion9
Document Root: C:\Coldfusion9\wwwroot
Version: 9.0.x
In the Servers tab within Builder, my localhost server appears with status of "Stopped"
When I right-click and select "Start Server" I get an error - "'Starting localhost' has encountered a problem. Ensure that the server is not already running, or another application is not using the WebServer port."
This same problem occurs, no matter what I name the server, e.g., "myserver" instead of "localhost".
When I view http://localhost/, the files under c:\inetpub\wwwroot are displayed.
Any direction would be greatly appreciated. Adobe's web server wizard assumes knowledge I don't have about the contents of the various fields and their interactions.
Thanks!Sagar,
Thanks for your response. The path is c:\inetpub\wwwroot\CFIDE/Administrator
Following your instruction: "If the same is under \inetpub\webroot\ then please specify the webserver port as 80." I got a server running under c:\ColdFusion9\wwwroot\. Both localhost/ and 127.0.0.1/ serve files from this folder.
My CF Administrator is still located at http://127.0.0.1/CFIDE/administrator/index.cfm. The \CFIDE folder is under inetpub\wwwroot.
So far, so good.
ColdFusion will serve CFM templates from c:\ColdFusion9\wwwroot\, but if I open one of these files using Builder, it won't display under the browser preview - it's simply white. I'm having difficulty understanding how to create projects and to create or edit anything.
I have prior experience, from back in the version 4 and 5 days. I loved Studio and Homesite, so I'm not totally unfamiliar.
Now that you've helped me get a server set up under Builder, I'm going to go to some help I found in Ben Forta's blog on creating projects and configuration.
If anyone has any quick advice, I would certainly appreciate. While I'd love to be able to switch among several projects in different subfolders, I'll settle for just one at this point.
Thanks!
John -
Lightroom catalog on separate drive?
I know the two normally go together, but is it posssible to put the Lightroom catalog on a separate drive from the previews?
Check this out. http://www.lightroomforums.net/showthread.php?6206-Separating-LR-catalog-and-preview-files -to-different-locations
-
Trying to setup PHP site (friendica) with nginx on localhost
Hi, just new here :-)
Started to use Arch a couple of month ago and sofar everything went fine thanks to the great documentation!
Now I tried to setup friendica on my computer for testing some modifications but I just fail on installing the required modules :-(
I already installed:
php
php-fpm
php-gd
php-cgi
php-mcrypt
mariadb
nginx
phpmyadmin
But I still get the following errors:
GD graphics PHP module (required)
Error: GD graphics PHP module with JPEG support required but not installed.
OpenSSL PHP module (required)
Error: openssl PHP module required but not installed.
mysqli PHP module (required)
Error: mysqli PHP module required but not installed.
Generate encryption keys (required)
Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys
If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".
Command line PHP
Could not find a command line version of PHP in the web server PATH.
If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron. See 'Activating scheduled tasks'
PHP executable path Enter full path to php executable. You can leave this blank to continue the installation.
Url rewrite is working (required)
Url rewrite in .htaccess is not working. Check your server configuration.
My nginx.conf looks like this:
#user http;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
keepalive_timeout 15;
gzip on;
gzip_comp_level 1;
server {
listen 80;
server_name localhost;
location ~ \.php {
root /srv/http/project;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
location / {
root /srv/http/project;
index index.php;
Can someone help me?Thanks for the quick answer!
progandy wrote:Did you enable all necessary modules in your php.ini?
I had a look at /etc/php/php.ini but I can't find things (with my knwoledge) that seem to be important....
progandy wrote:Then you'll have to create the rules in the .htaccess in the format nginx understands.
Haven't checked that yet...
progandy wrote:https://github.com/friendica/friendica/ … tall-Guide
This is quite complicated. Seems like I'd need to study to understand it:-(
progandy wrote:http://jcsesecuneta.com/tome/labox/sett … -on-nginx/
This one seemed clear I changed my nginx.xonf according to it:
server {
listen 80;
server_name localhost;
root /srv/http/project;
access_log off; # If you are using 'Analytics' type software for tracking, keep this 'off'
log_not_found on; # Turn on if you want to track "not found" errors
error_log /srv/http/project/logs/error.log info; # valid values: debug, info, notice, warn, error, crit
#rewrite_log on; # Uncomment if you want to debug your rewrites (then change 'crit' above to 'notice')
# block stuff early
# Do not log favicon.ico and robots.txt stuff
location ~* /(favicon\.ico|robots\.txt) {
allow all;
access_log off;
log_not_found off;
# Return error 444 for these files
location ~* ^.+\.(bzr|git|log)$ {
access_log off;
log_not_found off;
return 444;
# Deny public access to ~ (bak) files
location ~* ~$ {
access_log off;
log_not_found off;
return 444;
# Friendica #
location / {
try_files $uri $uri/ @friendicacleanurl;
location @friendicacleanurl {
rewrite ^/(.*) /index.php?q=$uri last;
break;
# Security: Friendica #
# block public access to .htaccess and .htconfig.php
location ~* /\.ht {
access_log off;
log_not_found off;
return 444;
# block public access to .tpl files located in /view/ folder
location ~* /view/(.*)\.tpl$ {
access_log off;
log_not_found off;
return 444;
# block public access to /util/ folder
location ^~ /util/ {
access_log off;
log_not_found off;
return 444;
# Deliver static files directly #
# images (Friendica)
location ~* /(addon|images|library|spec|util|view)/(.*)\.(bmp|cur|gif|ico|j2k|jp2|jpe|jpeg|jpf|jpg|jpm|jpx|mj2|mng|png|svg|svgz|thm|tif|tiff|webp)$ {
add_header Pragma "public";
add_header Cache-Control "public";
access_log off;
log_not_found off;
expires 28d;
# redirect 50x error pages #
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
internal;
# enable PHP #
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000; # Comment if you want to use sock instead of tcp
#fastcgi_pass unix:/var/run/php-fpm.sock; # Uncomment to use sock instead of tcp
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
but then nothing works anymore! When I try to restart nginx I get:
sudo systemctl status nginx.service
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: active (running) (Result: exit-code) since Sa 2013-12-28 18:05:13 CET; 1 day 22h ago
Process: 15591 ExecReload=/usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on; -s reload (code=exited, status=1/FAILURE)
Process: 318 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 314 ExecStartPre=/usr/bin/nginx -t -q -g pid /run/nginx.pid; daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 320 (nginx)
CGroup: /system.slice/nginx.service
├─ 320 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; daemon on; master_process on;
└─10295 nginx: worker process
Dez 30 14:59:10 thinker nginx[10294]: 2013/12/30 14:59:10 [notice] 10294#0: signal process started
Dez 30 14:59:10 thinker systemd[1]: Reloaded A high performance web server and a reverse proxy server.
Dez 30 16:12:58 thinker systemd[1]: Reloading A high performance web server and a reverse proxy server.
Dez 30 16:12:58 thinker nginx[15396]: 2013/12/30 16:12:58 [emerg] 15396#0: "server" directive is not allowed here in /etc/nginx/nginx.conf:1
Dez 30 16:12:58 thinker systemd[1]: nginx.service: control process exited, code=exited status=1
Dez 30 16:12:58 thinker systemd[1]: Reload failed for A high performance web server and a reverse proxy server.
Dez 30 16:15:33 thinker systemd[1]: Reloading A high performance web server and a reverse proxy server.
Dez 30 16:15:33 thinker nginx[15591]: 2013/12/30 16:15:33 [emerg] 15591#0: no "events" section in configuration
Dez 30 16:15:33 thinker systemd[1]: nginx.service: control process exited, code=exited status=1
Dez 30 16:15:33 thinker systemd[1]: Reload failed for A high performance web server and a reverse proxy server.
What's wrong? -
im trying to view locally hosted websites on my PC but firefox fails to display the wepages or the apache control panel each time i try???
Hi,
If the installation, configuration and settings of the XAMPP package are correct, you can try accessing via the addresses '''localhost''' or '''127.0.0.1''' after the web server has been started. Please also see [http://www.apachefriends.org/en/xampp-windows.html this].
Maybe you are looking for
-
Flex 3 vs Flex 4 Preprocessor directives and code behind (External Actionscript file)
I have a framework that I've built that I want to use on Flex3 and Flex4. I've added pre-processor directives as per this link (http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html) and got my Flex 4 code to compile nicely. I the
-
Please, who knows what to do, because the screen not slide anymore, after i put my IPOD TOUCH 2G 8GB in a notebook with Windows VISTA 64. I restarted, reinstall software, verified the contats. I did all possible solutions.
-
How to get yahoo email to push in iPhone 4
For the past 3 weeks my yahoo email is not pushing on my iphone 4. I have tried soft reset and even deleted my Yahoo account from my phone and set up again. All this to no avail. Prior to this period Yahoo would fail to push every now and then, A
-
Display Acceptance at origin in Purchase Order
Hello Experts, I am into SAP ECC 6.0 system. There is a requirement from our client to use Acceptance at origin process. I have understood the process from various threads which are available on sdn. When I am checking my Purchase Order this field is
-
I would like to get a set of portable speakers for my iPhone but am getting very confused. There seem to be lots of choices out there but none of them indicate if they are compatible with iPhone. Can you all suggest speaker systems that work with the