Common Apache Nginx commands

apachenginx
Assuming that you have installed it in a Linux flavour using default aptitude get, you can use the configurations and commands below. I use the tool “nano” as an example. I suggest using “vim”. You can do that by replacing nano with vim. To exit vim, (if you are stuck), just hit esc key once (looks like nothing happened. its normal), and type “:q <enter>”.
Change Apache 2.0 configuration

nano /etc/apache2/httpd.conf
sudo /usr/sbin/apachectl restart

Restart Apache 2.0

sudo /usr/sbin/apachectl restart

Change Nginx Configuration

nano /etc/nginx/nginx.conf
sudo service nginx restart

Restart Nginx

service nginx restart

Test Nginx Configuration

nginx -t

Reference
– http://httpd.apache.org/docs/2.4/programs/apachectl.html
– http://www.coolestguidesontheplanet.com/downtown/get-apache-mysql-php-and-phpmyadmin-working-osx-109-mavericks