Old 15th July 2009, 16:45
Junior Member
Join Date: Jan 2008
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default A few nginx questions

First,for some reason virtual host which i create,i always get error
403.I tried many things,from chowing to various owners and other,until i
found temporal solution-i created copy of html directory(which is
created during install and which working fine) called bla,and pointed
domain to bla directory and then it worked.But this is problematic since
all files are in home directory,which means i will need to copy all of
them into /usr/local/nginx/.
Also what is problem is with alias,i have a script which is located at
/home/ also and that again causing that 403 error since it's not located
in /usr/local/nginx.I tried to make it work by creating symbolic link
but that didn't worked.Seems only solution would be to copy script to
nginx directory which will require a lot of file editing because of
location change.

Also there is a problem with domain alias-*.domain.com not working at
all,nor 1.domain.com.If i have *.domain.com instead domain.com,then i
get 404 error on directory alias,while it works on www.

How do i enable hotlink blank protection for images,where images can be
loaded only by specified domains and direct access?

And how to rewrite following apache rule:
RewriteEngine on
RewriteRule ^directory/(.*)$ /st/st.php?%{QUERY_STRING}
I using latest stable version,and i think same problems was on latest
legacy version too.

Here is my server section of domain:
server {
listen 81;
server_name www.domain.com *.domain.com ;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root bla;
index index.php index.html index.htm;
location /TC/ {
alias /home/tradecontrol/client/;

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root bla;

# proxy the PHP scripts to Apache listening on
#location ~ \.php$ {
# proxy_pass;

# pass the PHP scripts to FastCGI server listening on
location ~ \.php$ {
root bla;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
include fastcgi_params;

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#location ~ /\.ht {
# deny all;
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lots of questions from noob papokergod Installation/Configuration 5 21st January 2009 14:19
Nginx + Apache Lordie Server Operation 3 20th December 2008 18:07
Nginx + Apache on Ubuntu 8.04 AdamBoyle HOWTO-Related Questions 3 10th December 2008 23:54
Some basic pre-installation questions jeffw85 Installation/Configuration 1 26th November 2007 09:25
Hostname & DNS questions... SurfingAlien Installation/Configuration 6 16th October 2007 17:32

All times are GMT +2. The time now is 07:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.