![]() ![]() Open a browser and navigate to your site’s domain or IP address. Return to your command prompt by entering CTRL+C. You should see your terminal return a process ID after issuing the previous command. Appending & to the end of a command will keep the web server’s process running in the background. Navigate to your root directory where your test.js file is located. log ( "Server is listening on port 3000." ) //Terminal output write ( file, "binary" ) //Sends body response Sudo chcon -t httpd_sys_rw_content_t /var/writeHead ( 200 ) //Header request response ![]() sudo chcon -t httpd_sys_content_t /var/www/ -R Use SELinux’s chcon command to change the file security context for web content. sudo systemctl start nginxĬreate your site’s root directory. Start NGINX and enable it to start automatically on reboots. Install NGINX, the command line utilities tmux, and tar. Then, you will set up a symlink to your files in the sites-enabled directory. Generally, you will create a new file containing a server block in the sites-available directory for each domain or subdomain you will be hosting. NGINX site-specific configuration files are kept in /etc/nginx/sites-available and symlinked to /etc/nginx/sites-enabled/. ![]() Remember to include sudo before running your text editor. If you’re not familiar with the sudo command, visit our Users and Groups guide.Īll configuration files should be edited with elevated privileges. Commands that require elevated privileges are prefixed with sudo. This guide is written for a non-root user.
0 Comments
Leave a Reply. |