[GRLUG] software suggestion - follow up

desert frag desertfrag at yahoo.com
Sun Mar 31 23:10:59 EDT 2013


Here's my Nginx conf file:

server {
listen       192.210.207.15:80;
server_name  starlight;

#charset koi8-r;
#access_log  /var/log/nginx/log/host.access.log  main;

location / {
root   /usr/share/nginx/html;
index  index.php index.html index.htm;
}

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   /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           /usr/share/nginx/html;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$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;
}
}


So it appears the document root is /usr/share/nginx/html.

Next, 

mkdir /usr/share/nginx/html/pics

then I uploaded a file called snapshot1.png to the pics directory.

Next,

chown desertfrag /usr/share/nginx/html/pics.

I wanted to make sure the server was running so:

service php-fpm start
service nginx start
service mysql start

But when I execute http://192.210.207.15/snapshot1.png

I get a '404 Not Found' response.

Any ideas?

----------------------------------------------


If you've got the webserver running, ll you need to di is figure out
where its documentroot is. I'm sure that is in its documentation
somewhere.

I'm not familiar with ngnix,  but the typical "default" location is /var/www/

SSH into the box, use su/sudo to create a directory within that path.
Call it "pics" (or whatever you want)

 Then chown it to your norml non-root user account (Make one if you
dont have ne)

Then all you need to do is SCP files into it.

URL will be http://[your_server_IP]/pics/whatever_the_filename_is.jpg


-------------------------------------------


 On Tue, Mar 26, 2013 at 9:09 PM, desert frag <desertfrag at yahoo.com> wrote:
>Ok the server side of Linux is a new experience so bear with me. >>I've set up a web site on my VPS: http://192.210.207.15/ >>Note it's Ngnix.  I think php and mysql were installed. >>http://192.210.207.15/info.php >>Hack away :) >>One suggestion was to use OwnCloud for an image hosting solution.  Well, >it's a mess with CentOS right now. >>https://github.com/owncloud/documentation/issues/56 >https://github.com/owncloud/documentation/pull/67 >>Since it's a mess I haven't proceeded. >>My original question was: >>>I've been using my new VPS mostly as a linux test bed and to learn more >>about it.  When I'm at a forum and want to attach a picture to a post I >>normally use places like photobucket or imageshack.  I would like my new >>server to handle this instead.  Any suggestions on what to use?  We're >>talking an occasional need, low activity situation.  CentOS x86-64. >>Another suggestion was: >>'Just set up a simple web server with Nginx or Twisted,
 and an SSH bookmark >to the shared folder. Drag and drop at will.' >>Alright, since it appears Nginx is functioning ok how do I proceed?  How are >images uploaded to the site? Do directories need to be created on the >server?  What would be the url of the images if I wanted to point someone to >a picture(s)? >>Would appreciate specific step by steps.  Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20130331/6bca51be/attachment-0001.html>


More information about the grlug mailing list