Can I Put Web Files Under /home With Nginx
Jul 8, 2007
nginx will look for web files under /usr/local/nginx/html. However, I want to put my website files under /home/public_html, is that possible with nginx? I can not find many things about nginx conf file explanation,
View 0 Replies
ADVERTISEMENT
Feb 24, 2008
I'll mention this is a cPanel/WHM server with about 15 accounts on it.
I get an e-mail everyday from my server's backup script telling me what new or changed files it found. Yesterday this summary was massive, and it showed new or changed files in these directories:
/proc
and
/home/virtfs
The type of files it contains:
"/home/virtfs/[username]/proc/140/task/140/exe"
"/home/virtfs/[username]/proc/139/exe"
"/home/virtfs/[username]/proc/139/task/139/exe"
"/home/virtfs/[username]/proc/227/exe"
"/home/virtfs/[username]/proc/227/task/227/exe"
"/home/virtfs/[username]/proc/374/exe"
The /home/virtfs directory is something I haven't seen before, and it contained two directories belonging to two accounts on the server.
Does anyone know why these directories would be created or what they are for? The bit of reading I've done on this so far mentions that these directories will be created as a result of jailed SSH, but neither of those two accounts have ever had jailed SSH enabled.
View 2 Replies
View Related
Aug 2, 2008
how can I list all files ending with .sql and .tar.gz in /home and save it to a file.
View 8 Replies
View Related
Apr 25, 2008
to found all of index.html files in my /home directory.
how can I found these files?
like this:
/home/a/public_html/index.html
/home/a/public_html/folder/index.html
/home/c/index.html
View 2 Replies
View Related
Jun 3, 2008
I wanted to list down all files owned by 'root' inside /home directory and all users directory inside /home/users including subfolders and everything!
the command below works but only works when executed within the working directory.
ls -l | awk '{print $3" " $9}' | grep root
View 4 Replies
View Related
Aug 27, 2014
I am the owner of a VPS, where i host a website.
However this website suddenly was returning 404 nginx errors (on certain files), however these files do exist.
If i try to access a file that doesnt exist it gives me a regular 404 browser error (not nginx).
During loading of one these files i also noticed it was loading openadserving.com
So i think my server has been infected.
For example this is a logo image: [URL] ....
View 1 Replies
View Related
Jul 19, 2014
I have recently switched from Ubuntu to Mint because I would like to enjoy out of the box functionality. I installed Apache, PHP and Mysql. When I go to localhost, the page displays correctly indicating that the server is functioning. In /var/www/html I created devPages. In devPages I created a symlink to a directory in my home directory where I keep all of my html/php files.
When I point my browser to http://localhost/devPages/1/ I get "You don't have permission to access /devPages/1/ on this server". This appears to be a permissions/ownership issue. I don't want to change the permissions for the directory or files in the home directory because they are set to work properly on my production server. Is there a way to get apache to accept files in my home directory?
I have set owner and group for devPages and the symlink to www-data. Set permissions to 755 for devPages.
By the way, under Ubuntu, I have always used a symlink and it always worked without any issues.
View 1 Replies
View Related
Jun 25, 2009
I need to clean up the .spamassassin directory for all the accounts on the server. The Bayes files are getting too big and causing mail handling issues.
How would I do that?
I assume this won't work - and don't want to try it until I hear a little feedback:
rm -f /home/*/.spamassassin/*bayes*
Basically, I need a command that will do what the above command looks like it would do - I just don't think the wildcards will work in that manner, and don't want to try it for fear of deleting items outside of the .spamassassin directory.
I'm running CentOS 5.3.x with cPanel/WHM - if it matters...
And feel free to suggest other spam blocking software - but we've gotten rather good at tweaking SA to get the job done. Just this annoyance of the bayes files growing continuously is a pain sometimes...
View 7 Replies
View Related
Jan 2, 2008
I couldn't keep my mouth shut (technically fingers). A customer wanted to upgrade servers and he needed a way to move the data across. Since I don't allow hard drives to be swapped, they have to do it manually all by themselves. I generally allow up-to 4 days for them to transfer data and make DNS changes, etc. But this time, I offered help! I agreed to move the data (darn me) and it just came out of me, involuntarily.
God knows what just happened... but in a positive way, customer is extremely happy!
So...
Both servers are on cPanel - with root access (duh)
200 odd files which total to 25 GB
1 database about 100 MB in size (no biggie)
I was planning on using one of my Windows 2003 servers (via remote desktop) to download the 25 GB and upload the 25 GB, but that sounds like a waste of resources and time.
View 8 Replies
View Related
Jul 15, 2009
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 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
#
location ~ .php$ {
root bla;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/usr/local/nginx/bla$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /.ht {
# deny all;
#}
}
View 4 Replies
View Related
Mar 26, 2009
i dunno if any one here can help (im hoping some one can) but basically i have installed nginx onto a freebsd server, added 2 domains to this webserver.
the first domain works correctly and loads up all php files etc how ever the second domain wont.
its pretty confusing as both configs are the same, if i comment out the working config the non working one will work perfect.
i have uploaded a copy of the configs onto
www f1colo com / config.txt
View 10 Replies
View Related
May 23, 2009
Well, I decided giving it a shot.
I have a large proxy, are getting ~3k pageviews/day.
I only got 128 MB RAM on my VPS, so no panels works on it (not even kloxo/lxa). I would guess apache wont do it in the long run either.
So I decided to go with nginx. But I feel it isn't quite good optimized, as it sometimes takes like 1 minute to load the page.
Here is my current config:
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.codemongers.com/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################
#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.codemongers.com/NginxMainModule
#
#----------------------------------------------------------------------
user nginx;
worker_processes 12;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 1024;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 80;
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /.ht {
# deny all;
#}
}
}
Any ideas on better optimizing?
View 9 Replies
View Related
Jun 1, 2009
we got installed Nginx on server though it helped us to reduce load of our file uploading sites server ,strange but uploads are not working, script uses uber upload please help me to get it work
View 2 Replies
View Related
Mar 7, 2009
I was just wondering if anyone has tried using nginx to accelerate Apache under cPanel?
I found a tutorial on how to do it
[url]
and he got amazing results from trying it
[url]
just wanted to see if anyone else has any experience with it
View 8 Replies
View Related
Jun 17, 2009
I have nginx conf which works perfectly fine with ip adress,but when i put domain then php for some reason no longer works,i getting download php file situation.
Here is main conf file:
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.codemongers.com/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################
#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.codemongers.com/NginxMainModule
#
#----------------------------------------------------------------------
user nginx;
worker_processes 5;
error_log /var/log/nginx/nginx-error.log crit;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 2048;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/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 off;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 81;
server_name main.main.net;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ .php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /.ht {
# deny all;
#}
}
}
View 1 Replies
View Related
Apr 3, 2007
A few days ago I switched from lighttpd to nginx for serving images on my photo hosting service. I've noticed speeds have increased greatly, and average server load has dropped from 0.15, down to 0.01.
Nginx was originally made by this russian guy, and has gotten fairly popular among nerds. I was just wondering if anybody else out there is using it, and if they have any tips for optimization, or feature improvements.
The one thing i miss about lighttpd was the server-status module. Nginx has it's own, but it doesn't seem to be as verbose as the one lighttpd had.
nginx homepage: [url]
View 4 Replies
View Related
May 30, 2009
I have install FreeBSD and i use Nginx for run my website on this webserver.
All working good and the server running from 1/2month..
Today when i visits my site i have see Nginx Gateway Error 502..
and from shell i run top command and all processor are using 0% of cpu but use the normal ram..
all is stopped..
but i don't know why and how happen..
Any people have the same error?
I think i do create a monitor script and when appen just reboot the server (i have solve this problem rebooting the server each 502 error)
View 4 Replies
View Related
Oct 3, 2009
look for someone to do the installation and configuration of these two (lighttpd or nginx) to run along with Cpanel as compatible as possible.
Hired a 'SultanHost' but the service was not expected and support the worse.
View 12 Replies
View Related
Jun 23, 2009
Here is the comparison between Apache and Nginx. Request processing overhead and real-world application performance measurements included.
[url]
View 7 Replies
View Related
Aug 14, 2008
I am doing my web like this:
1) nginx listening at port 80
2) apache listening at port 78
3) nginx throws all shtml pages to apache
they are working perfectly, except one small thing:
I don't want any public visitor may visit port 78 directly, for now, both:
[url]
[url]
are working for visitors.
Anybody knows how to block/hide port 78 to the public access?
my nginx config snippet:
Code:
location = /index.shtml {
proxy_pass [url]
}
my apache2 config snippet:
Code:
Listen 78
If I make apache as follows:
Code:
Listen 127.0.0.1:78
I will get 502 bad gateway when I visit:
[url]
View 1 Replies
View Related
Jul 24, 2008
does anyone on this forum know how to do a referral check to prevent hot linking to files that are on a nginx server? There is this regex code you use but I don't know how to put it together. how to do it on nginx using their rewrite module?
View 12 Replies
View Related
Apr 13, 2015
I am wondering if there is an easy way to convert apache to nginx on my Plesk 12 server. Ideally, I would like to save all my hosts without having to re set them all up. I have been searching online, but haven't found a simple way to do so.
View 1 Replies
View Related
Apr 20, 2009
According to the latest trend and technological advances, which server software should people go with from the very beginning. Which do you recommend as on today?
btw anybody has experience with all 3 (apache/nginx/litespeed) webservers?
I have -
On a common shared environment, I started off with Apache - was fine until some load started generating and it became crapache.
Then litespeed - Totally awesome, could seriously feel the difference, but its cost is something not everybody can afford.
Then nginx - Very nice, felt like litespeed only, the only difference was it got quite complex in configuring it at a later stage BUT its free'ness made me love it badly.
View 4 Replies
View Related
Aug 3, 2008
Has anybody successfully used nginx in a shared web hosting environment?
It seems quite powerful and looks like it would be well suited for such an environment, combined with FastCGI, looks like it could serve a lot of hits on relatively inexpensive servers.
The main problem I'm foreseeing is a demand for mod_rewrite, which may cause some support headaches.
Anything else I'm not thinking of?
(I did search but the last post I found was from 2007 with no replies, and necroposting is bad)
View 0 Replies
View Related
Aug 15, 2007
Anyony use nginx as web server in shared hosting enviroment? maybe with some custom made control panel's?
How is about its scalability, php performance and so on?
View 0 Replies
View Related
Feb 25, 2015
I have a VPS running Parallels Plesk 12.0.18 Update#36 and CentOS 6.6. I'll like to move (if it's possible uninstall complete) Apache and let Nginx to manage all the request coming from outside.
View 4 Replies
View Related
Oct 30, 2014
Today at 12.50 pm my (ubuntu 14.04.1 LTS) server running plesk 12.0.18 suddenly stopped serving websites. Any attempts to access a webpage on any vhost returned the 502 bad gateway using Nginx error messsage.When I looked at the nginx logs, I found messages like:
2014/10/30 14:48:00 [error] 3099#0: *101 connect() failed (111:
Connection refused) while connecting to upstream, client: m.m.m.m, server: , request: "GET /server-status HTTP/1.0", upstream: URL....
Restarting apache & nginx (/etc/init.d/apache2 restart & /etc/init.d/nginx restart) made no difference and I had to reboot to restore http access.
Strangely if I browsed with port 7080 specified (i.e. http://n.n.n.n:7080), this worked fine for all vhosts, so apache (which I believe is listening on this port while nginx listens on port 80) is working fine - nginx is just not able to pass stuff to it?
View 15 Replies
View Related
May 12, 2014
My current version of nginx in plesk 11.5.44 is 1.5.0 and i would like to update it to the latest stable version which is 1.6.0. However, i cannot seem to manage to do so. I tried with yum update nginx but i receive Package(s) nginx available, but not installed.
View 1 Replies
View Related
May 26, 2014
Is here any way to get nginx running on the web nodes and be able to manage it from the CP like standalone Plesk servers?
View 3 Replies
View Related