Programming :: Nginx X-Accel-Redirect ?
Jun 12, 2011
I have this code in PHP that is hosted on an nginx server.
Code:
I can download the files but the problem is I think nginx is treating it as a text file and changes all "0x0A" to "0x0D 0x0A"
Unfortunately the files are not text files but executable files which makes the downloaded file corrupted.
Do I need to add a specific header to prevent this from happening?
View 1 Replies
ADVERTISEMENT
Aug 7, 2010
I had just set up nginx on my server. I have PHP and everything working okay. Except when I try the URL
http://xxx.xxx.xxx.xxx/123
I get redirected to
http://_/123
but when I try the url
http://xxx.xxx.xxx.xxx/123/
It works just as I want it to. How can I get nginx to treat the slashless url decently?
View 2 Replies
View Related
May 20, 2010
how could i rewrite and redirect
Quote:
[URL]
to
Quote:
[URL]
domain from forum. to club. (red color part) url rewrite, blue color part is variable
View 3 Replies
View Related
Mar 16, 2011
I had a task to install nginx,i download the nginx-0.5.35.tar.gz and i extracted.I got following error when i ran these commands ./configure ----with-http_gzip_static_module & ./configure --with-http_geoip_module
[root@localhost nginx-0.5.35]# ./configure --with-http_gzip_static_module
./configure: error: invalid option "--with-http_gzip_static_module"
[root@localhost nginx-0.5.35]#
[code]....
View 13 Replies
View Related
Mar 9, 2011
I am trying to grep multiple numbers from file, grep does have the -f option for that.
Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with
Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?
View 2 Replies
View Related
May 20, 2010
I've read and re-read NVIDIA the hard way but before I do this I was hoping to get a few items cleared up for the text.
First: I have 11.2 installed and the latest reference is to 11.1. Can I assume comments about 11.1 pertain to 11.2?
Second: There's a line about using Sax2 that states: "With 10.0 you won't need to specify -m 0=nvidia any more, sax automatically detects and uses it if you activate 3D acceleration."
I had to use the sax2 -r -m 0=nv to get my display to use the nv driver. Won't I need to do the same for 11.2?
And how do I determine if 3D accel is activated? Is that a selection in a dialog that occurs during the sh NVIDIA-yada-yada.run -q execution or what?
View 9 Replies
View Related
Jul 16, 2010
I booted the 11.3 live cd (KDE) and it worked great, so I installed openSUSE. After installation my video acted funny - the screen would occasionally blank when I opened a window, moved or resized a window, etc. It's as if the video driver decided to redraw the entire screen.
So I rebooted the live CD to see what was different and noticed this:
So it seems the 3D driver is an issue. Is there a way I can tell SUSE to just use the swrast 3D driver?
View 1 Replies
View Related
Apr 20, 2010
Does unistd.h declare functions in the kernel or in the stdclib? Or in any other C file. I need to know from the inside how some of the functions work.
So where does unistd redirect to?
View 4 Replies
View Related
Jun 4, 2010
My hardware is the FriendlyArm mini2440 Samsung board. I run our main application from init.d/rcS. It uses printf's to display continuous program debug information that can be seen on the serial ttySAC2 console. I would like to be able to remotely view this information by a telnet connection when needed. What is the best way to accomplish this? The telnet user can possibly activate some script or program. I saw there is a ttysnoop program that I could not get to compile.
There must be a simpler way. There must be several ways. Instead of using printf I could do something else. I do not want to use a normal log file to the flash file system. I had thought of using a ram file in /var directory but it would complicate matters as I would need to limit its size and the telnet user needs to view the program's printfs in a real time fashion.
View 1 Replies
View Related
Aug 6, 2010
I am again struggling to make a script work, but hey, it is fun, I am learning new things. I discovered the set -x option which was, for me, like the second coming. Still, what I am not able to do is redirect ALL output to a (log) file, including what is produced by the -x setting. Let's assume a very simple script:
Code: #!/bin/bash
set -x
source="/home/atelier/Bureau/"
ls -la $source and I am running it as . test.sh >> /var/log/test.rmcb.log
The result of ls goes inded into the log file, but the rest still shows on the console where I am running the script: Code: ++ source=/home/atelier/Bureau/
++ ls --color=auto -la /home/atelier/Bureau/ Is there a way to redirect EVERYTHING to the log file ?
View 3 Replies
View Related
Nov 12, 2010
I feel kind of embarrassed posting here, but this is technically a scripting sub-forum. Here is the problem. I have a folder with various files which include .txt files as well
How can i redirect same content to each of the .txt files in the folder?
I have tried
Code: $ echo "hello" > *.txt
-bash: !": event not found Code: also cat ~/otherdir/test.txt > *.txt
-bash: *.txt: ambiguous redirect Can anyone help me with this?Ok i solved it
Code: #! /bin/bash
for file in *.txt
do
echo "Text that needs to be written" > $file
done
View 2 Replies
View Related
Oct 23, 2010
I want to do the following redirectin inside a bash script :
1. all the stdout will be redirected to a /tmp/log
2. all the errors will go to the stderr and also to the /tmp/log.
The following inside a bash script is not working, WHY and HOW to do it:
Rest of the bash script.
View 4 Replies
View Related
May 12, 2009
I have a little complex Makefile system. A parent Makefile call dozens of Makefiles in subdirctories. And the subdirctory Makefile calles shell script to do real building. I want to grab all output this Makefile system generate. So, i employ "make 2>&1 > make.log". but not all output messages are filed into make.log. The message generated by sub-makefile called shell script cannot be recorded into make.log. And another curiouse thing is, if i launch "make 2>&1 > make.log" in a perl script, all output do be sent into make.log.
View 2 Replies
View Related
Oct 31, 2010
I would really like to capture the output of scp and my file's progress. Scp updates the transfer rate every 1 second, and I will like to save the transfer rate at every update. So for example, if the file transfer takes 30 seconds, I would like 30 reports of the transfer rate.
The output looks like:
Code:
file.dat 1% 3664KB 938.5KB/s 05:48
Whenever I try a simple redirect like:
Code:
scp file.dat 192.168.1.100:~/ &> output
... it does not save the rate at every update, it only shows the final rate.
If I try using typescript by starting "script" ... it's the same deal.
View 7 Replies
View Related
May 24, 2011
I need to redirect a /usr/sbin/sendmail command to $HOME/bin/msmtp .The sendmail command would be coming from a PHP5 application. I'm assuming the best way is to use .bashrc, but .htaccess is also available.The remote server is a shared web host which is running Debian 4.0.I do not have root access.I have SSH access.
View 2 Replies
View Related
Aug 18, 2010
I'm trying to write a shell script that do ftp and download file periodically, this script should be called by a daemon running in the background.
the shell script "script.sh" is as follows:
Code:
yafc ftp://test:test@192.168.1.225:21 < commands
and the "commands" files is
Code:
d Root/md5* /
quit
if I run script.sh it will work just fine. But when the daemon software calls the "script.sh", the script will send ftp login request to the ftp server, but will not even answer the username or anything.
I believe it is something about child process redirection, but I don't know how to deal with it.
This problem is not only with yafc, it is the same with any ftp client or any application like telnet and so.
View 4 Replies
View Related
May 21, 2011
I have a huge database of students, I would like extract these data and write to individual file for each students.
I am running a loop in shell program (.sh file), the output of each run in the loop need to redirected to a file with variable name.
I tried the following line, but it did not work, where BodyMsg is the data and Rollno is the students roll number.
echo $BodyMsg > $RolNo".html"
View 5 Replies
View Related
May 18, 2009
I need to output of the script to the remote server via redirect. I created a simple script for your reference.Quote:
#!/bin/bash
W=`/usr/bin/w`
FREE=`/usr/bin/free`
[code]...
View 4 Replies
View Related
Feb 11, 2010
I have got a script with an outer and inner loop. The inner loop issues loads of echo's which need to be redirected to a log file determined by the outer loop. The obvious solution is to redirect every echo to >$LOG and set LOG in the outer loop.
Code:
for f in $FILES ; do
LOG=<logfile>
for l in $LINES ; do
[code]....
it is possible to map stdout to $LOG in the outer loop without having to redirect every subsequent individual command output?
View 4 Replies
View Related
Sep 6, 2010
I did a select on my db and now I need that this if consult return true for me salve the columns information in file. How I do this in Shell?!
View 3 Replies
View Related
Jun 2, 2011
I have a collection of redirect links I need to grab the final domain from (indicated after "->"):
[url]
[url]
I'm thinking PHP/cURL is the way to do it. I've searched the net but failed to find a solution that works for all redirection links.
View 2 Replies
View Related
Aug 17, 2010
I am using a simple javascript to connect my flv streams with Red5 (streaming server) every thing is working perfectly fine in Mozilla and Chrome.
But when it comes to IE it simply wont load the player.
Here is my script code...
How do I detect the client browser and redirect him to adobe flash upgrade page if the client browser does not have a supported player?
View 4 Replies
View Related
Oct 26, 2010
To redirect standard output to multiple files:
Code:
echo Test | tee file1 file2
My problem is that the word "Test" still displays to the screen? I want same effect as:
Code:
echo Test > file1
but with multiple file redirection.
View 3 Replies
View Related
May 14, 2010
How system call internals could be known ? I mean for example if i take the example of write system call of linux kernel, where i can find out the code of write() system call in the kernel source tree ? The problem is write() system call directly write on console.If we want to write the data on some web page then write() system call will not do that ? How to redirect out data from console to application like html/web page?
View 6 Replies
View Related
Apr 7, 2009
I have recently merged two Joomla 1.0 sites I ran into one. I imported the articles I wanted to keep to the new site, and I have the old site's domain pointing as an alias at the new site. The new site is www.theouthousers.com . The old site was www.bludblood.com .
I also have the core SEF URLs on, using the htaccess.txt file that came with Joomla.
I have one writer for the old site who linked to his articles in various places, so I am trying to set up redirects for him so that he doesn't have to change all of his links.
For instance, I need something like:
http://www.bludblood.com/joomla/inde...d=25&Itemid=51
To redirect to the equivalent location on the new site:
[url]
And I also need specific links like:
[url]
To redirect to their new counterparts:
[url]
Keeping in mind that www.bludblood.com is now an alias of www.theouthousers.com, is there any way to do this? I have been trying with rewrite rules and redirects, and cannot seem to achieve the desired effect.
Tried various versions of:
Code:
Redirect [url] [url]
With the http, without, as regexps, as 301s, as permanents, etc, and it just will not work. Also tried as RewriteRule.
View 2 Replies
View Related
Feb 10, 2009
My friend has a website whereby once you have logged in on one page, you are redirected to another page, with a url similar to:
[URL]
the random string changes each time you log in, however the login page has a static url What i was attempting to do is run a script to get some data from the members page (after uve logged in) - however ive been having some trouble in how to do this, as the variable url with the random string will become invalid after a certain time, and i did not want to consantly change it.
While reading through some documentation i read that wget should be able to login to a form login website however ive had no luck, the command i was attempting to use was:
wget --user USERNAME -password PASSWORD [URL]
similarly i also tried
wget --post-data "username=USERNAME&password=PASSWORD" [URL]
and even both combined. However neither has worked as the html dl'd is simply the login page website. I cannot post a direct link to the website as it is private, however ive looked at the source coding and ive extracted (what i think) is the relevant bit, which is:
Code:
<form action="/cgi-bin/sblogin/login.cgi" method="post" name="login" id="login"><br /><br />
<div class="user_text"><span class="text3">USERNAME:</span></div><div class="user_box"><input type="text" class="text" name="uname"></div>
[code].....
View 1 Replies
View Related
Feb 16, 2010
Got site hosted, up and running now trying to work out the website particulars.
Right here it goes, not sure if it is at all possible but any input would be much appreciated.
Here's the deal. Developing an easy straight forward online store integrated with EBSWorldpay . Not looking for any fancy stuff. What i would like to do is put a flash url link that would direct a user to a html file that contains a hidden form and it would submit it on load redirecting a user straight to EBSwordpay checkout. Simple HTML Redirect with submited form.
Check the link here it has the source code of the form that is required.: [url]
Trying to use Example 0.1 ( So instead of having a separate page with a "BUY" for the form to be submitted, I would like to get the form posted straight away which would in turn load the payment site. Would create a seperate html file for each item and have redirects on the main website linking to those onLoad submit forms.
View 1 Replies
View Related
Jun 27, 2011
I have a set of bash scripts that I'm running that automatically build a set of packages for me and redirect their output into logs. Basically, I have a bunch of lines that are something like this: ${CONFIGURE_DIR}/configure &> ${LOG_DIR}/log or cd ${CONFIGURE_DIR} && make &> ${LOG_DIR}/log, etc.
This is supposed to make the entire process silent. However, sometimes with some packages some output leaks to my console (either stdout or stderr). I'm thinking that maybe the configure scripts/make are executing commands within new shell instances that don't inherit my redirect, or something to that effect.
Another reason for thinking this is that in another part of my script I detect errors when running make by testing with "if [ $? -ne 0 ]", and if the redirect leaks to my console and also the leaked output indicates that the build failed ("make: Error" and so on), then my $? test fails (i.e., it thinks that $? == 0, whereas a failed make should return a non-zero value). It's as if my original script can't "see" the results from child commands executed from later scripts.
View 1 Replies
View Related
Sep 3, 2010
I just want to try using NGINX as reverse proxy for POP3 and IMAP. Does anyone know how to configure it ?
View 7 Replies
View Related
Jun 2, 2011
way to get nginx to perform DNS lookups at regular intervals against hostnames that are defined for upstream servers? It seems nginx only performs a DNS lookup once, the first time it starts, and subsequently does not perform any other DNS lookups. This causes problems when the ip addresses of our upstream servers change.
I posted this same question in the nginx forum; however I also posted it here as it seems that not many of the posts there get answered.
[URL]
View 6 Replies
View Related