Updating config file

I’ve been told that I need to update a config file on the server but am not sure exactly what to do and would be grateful for a little advice.

I’ve got the path and have found the file using FileZilla but can I just edit it like that? Also how do I restart the server after?

Thanks in advance

Which file? Why? Who advised you in this way?
No one can help you without a little more information.

This is the file: /etc/apache2/vhosts.d/00_default_vhost.conf and it was the old developer who told me I need to do this (I only started in the job a month ago).

I need to do it because I need to change the directory of our site


Parkin was quite correct so thanks for the (partial) add’l info.

Changing the vhost.conf file SHOULD be done using cPanel, not a direct edit of the file itself. Of course, if you don’t have cPanel, then the direct edit should work, too.

As for restarting Apache, you must be aware that will take your server offline through the reboot AND, if you have an error in your syntax, it will prevent the server from booting, i.e., NOT a thing for a “noobie” to be attempting! Again, however, if you’re using cPanel, you should also have a copy of WHM which makes the server reboot trivial.

Point 1: MORE information is still required as your control panel is critical in the change you’re performing.

Point 2: If you’re asking these questions, it would indicate that you should NOT be making these changes (at least, not without supervision). Server modifications are a step above webmaster skills.

Point 3: Many years ago, I used Kevin Yank’s book (first then second versions of … whoops, book out on loan but it was something about using MySQL and PHP to build websites) to create a test server (so the production server would not be impacted by a noobie’s {my} errors). Rather than use WAMP or XAMPP or any other “canned app,” Kevin’s first two books led me through installing individual daemons for Apache, PHP and MySQL (and PHPMyAdmin) and linking them together. That experience was terriffic as I can get around in the WinDoze versions very handily. Yes, the Linux versions of the daemons are a bit different (primarily the file names and their locations) but they operate the same. In other words, lose your “noobie” status quickly and you’ll love it!



Thanks for the advise, I was given a list of parts of the file that needed to be deleted along with the lines that needed to be changed. We don’t have cPanel so I had to change it directly. Just to be safe though I made sure I backed the files up first then after I restarted the server made sure everything worked okay.

I can honestly say that it was extremely stressful but I did it okay in the end. :slight_smile:


Congratulations, you’ve entered the big time!

That said, I’ll stand by my recommendation to setup a test server so you don’t need to be as nervous about making changes ('glad to hear that you backed up the files before changing them!) after testing offline.



Thanks, I’ve learnt that lesson about backing up before!!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.