What do you mean, the full path is not working on Apache?
When you access files in PHP, the root directory is the system's root directory. When the web browser accesses the files, the root directory is the web root.
I'm guessing /var/www/html is your web root. If you have something like this:
<img src="/images/file1.jpg">
it should work.