Just installed nginx and now having bind error - address already in use

i am running a vps with apache. just installed nginx. got the address already in use error at port 80 because apache is using it. I am new to linux/apache stuff so is it possible to change the port of nginx and how ? if yes will it work as i want it to serve static files automaticaly or should i get my hosting company to do it instead since i don't know much about these.

and yes i used this tutorial to install it http://library.linode.com/web-servers/nginx/installation/centos-5

Help Appreciated :)

Thanks in advance

Answers


Look either into

  • your nginx.conf file
  • or any of the sites in sites-enabled (usually under the nginx directory)

and search the server part, listen

  server {
    listen   80;

here you can change the port for 81 for instance instead of 80.

Notes:

  • you may also have the server { listen } part within your nginx.conf directly
  • if you are under Linux, the configuration is usually in /etc/nginx (nginx.conf) and sites-enabled is below that directory.
  • regarding Apache (Linux), using either service apache stop or service httpd stop or /etc/init.d/apache stop (or httpd) should work to stop the process, or try killall httpd or killall apache (or apache2) to stop Apache.

Need Your Help

counting rows via php is faster than COUNT in SQL?

php mysql sql

In short my question is this: Why is this

Querying a database within a PHP function

php mysql

I'm trying to load some data from a database using PHP, but for some reason it doesn't work when I put it inside a function. If I try the code without a function, it works fine:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.