Re: ubuntu apache2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok.. weird...

appears might have been a timing thing.. i get errs..
but they're all apache errs..

except -- now shows nginx... this is weird!


On Sun, Nov 12, 2023 at 12:09 AM bruce <badouglas@xxxxxxxxx> wrote:
>
> hi...
>
> ok...
> http://157.245.251.134
> --generates the default apache page..
>
>
> http://157.245.251.134/wave/
> --generates a 403 forbidden...
>   from nginx!!!  ---- ok.. looks like nginx is/might be interfering
> with this... makes sense... another person had been modifying some
> things and was going to use docker -- which might have nginx as
> well...
>
> hmm.. so how to get rid of this..
>
> I did a stop nginx.. it's not in the ps/process tbl...
>
> so why is it somehow showing up in the url traffic..
>
>
> On Sat, Nov 11, 2023 at 11:16 PM bruce <badouglas@xxxxxxxxx> wrote:
> >
> > hi..
> >
> > /etc/apache2# cat /etc/apache2/sites-available/wave.conf
> > <VirtualHost *:80>
> >     ServerAdmin foo@xxxxxxxxx
> >     ServerName  161.35.5.174
> >     ServerAlias temp
> >     DocumentRoot   /var/www/html/wave/wave/public
> >
> >     DirectoryIndex index.php /public/index.php
> >
> >     <Directory    /var/www/html/wave/wave/public>
> >             #Options Indexes FollowSymLinks MultiViews
> >             Options +FollowSymlinks
> >             AllowOverride All
> >             #Order allow,deny
> >             #allow from all
> >             Require all granted
> >     </Directory>
> >
> >     LogLevel debug
> >     ErrorLog ${APACHE_LOG_DIR}/error.log
> >     CustomLog ${APACHE_LOG_DIR}/access.log combined
> > </VirtualHost>
> >
> > is the only vhost file
> >
> > cat /etc/apache2/mods-available/alias.conf
> > Alias /icons/ "/usr/share/apache2/icons/"
> > Alias /wave/ "/var/www/html/wave"
> > #Alias /wave/ "/var/www/html/wave/public"
> >
> >
> > <Directory "/usr/share/apache2/icons">
> >     Options FollowSymlinks
> >     AllowOverride None
> >     Require all granted
> > </Directory>
> > --------------------------------------------
> >
> > is where I was trying to test the alias...
> >
> > systemctl restart apache2  --- runs ok...
> >
> > and apachectl -S
> > still gives the default DocumentRoot  !!
> >
> > I'm not seeing my errors..
> >
> >
> > On Sat, Nov 11, 2023 at 10:45 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >
> > >
> > >
> > > On Sat, Nov 11, 2023 at 10:37 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >>
> > >> Weird....
> > >>
> > >> Seems the "DocumentRoot" as displayed in
> > >> apachectl -S
> > >> AH00558: apache2: Could not reliably determine the server's fully
> > >> qualified domain name, using 127.0.1.1. Set the 'ServerName' directive
> > >> globally to suppress this message
> > >> VirtualHost configuration:
> > >> *:80                   161.35.5.174 (/etc/apache2/sites-enabled/wave.conf:1)
> > >> ServerRoot: "/etc/apache2"
> > >> Main DocumentRoot: "/var/www/html"  <<<<<
> > >>
> > >> never gets changed regardless of what I do with "wave.conf" in the
> > >> /etc/apache2/sites-available/wave.conf
> > >>
> > >> Researching the 'net.. seems others have experienced the same issue...
> > >>
> > >> just weird..
> > >>
> > >>
> > >>
> > >>
> > >> On Sat, Nov 11, 2023 at 9:43 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >> >
> > >> >
> > >> >
> > >> > On Sat, Nov 11, 2023 at 9:25 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >> >>
> > >> >> I wasnt sure if servername is optional, or used. Since I have no
> > >> >> domain/server, I'm assuming I can the use the test ipAddress..
> > >> >>
> > >> >> still testing!
> > >> >>
> > >> >> thanks
> > >> >>
> > >> >> On Sat, Nov 11, 2023 at 8:46 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > On Sat, Nov 11, 2023 at 8:41 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >> >> >>
> > >> >> >> arrggg..
> > >> >> >>
> > >> >> >> Ok. something's going on that I'm missing..
> > >> >> >>
> > >> >> >> I changed the wave.conf in the /etc/apache/sites-available
> > >> >> >> /etc/apache2/sites-enabled
> > >> >> >>
> > >> >> >> I actually renamed the file to wave.conf1
> > >> >> >> I did the a2dissites *.conf as well as stopped/restarted apache2
> > >> >> >>
> > >> >> >> I then did
> > >> >> >>  apachectl -S
> > >> >> >> AH00558: apache2: Could not reliably determine the server's fully
> > >> >> >> qualified domain name, using 127.0.1.1. Set the 'ServerName' directive
> > >> >> >> globally to suppress this message
> > >> >> >> VirtualHost configuration:
> > >> >> >> *:80                   127.0.1.1 (/etc/apache2/sites-enabled/wave.conf:1)
> > >> >> >> ServerRoot: "/etc/apache2"
> > >> >> >> Main DocumentRoot: "/var/www/html"   <<<<<<<< what the heck!!!
> > >> >> >> Main ErrorLog: "/var/log/apache2/error.log"
> > >> >> >> Mutex mpm-accept: using_defaults
> > >> >> >> Mutex watchdog-callback: using_defaults
> > >> >> >> Mutex rewrite-map: using_defaults
> > >> >> >> Mutex default: dir="/var/run/apache2/" mechanism=default
> > >> >> >> PidFile: "/var/run/apache2/apache2.pid"
> > >> >> >> Define: DUMP_VHOSTS
> > >> >> >> Define: DUMP_RUN_CFG
> > >> >> >> User: name="www-data" id=33
> > >> >> >> Group: name="www-data" id=33
> > >> >> >>
> > >> >> >> Main DocumentRoot: "/var/www/html"   <<<<<<<< what the heck!!!
> > >> >> >> and I get this as the default... where/why is this set?
> > >> >> >>
> > >> >> >> did a "find" and only saw it in the /etc/apache/* files I had
> > >> >> >> renamed.. there are no *.conf for the testing... (for now..)
> > >> >> >>
> > >> >> >> any thoughts/ideas!
> > >> >> >>
> > >> >> >>
> > >> >> >> thanks
> > >> >> >>
> > >> >> >> On Sat, Nov 11, 2023 at 6:24 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > On Sat, Nov 11, 2023 at 6:20 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >> >> >> >>
> > >> >> >> >> Thanks..
> > >> >> >> >>
> > >> >> >> >> Tried again. Same results. As far as 2.2 directives vs 2.4.. could you clarify?
> > >> >> >> >>
> > >> >> >> >> Pretty sure this is simple.. but can't see what's missing...
> > >> >> >> >>
> > >> >> >> >> thanks
> > >> >> >> >>
> > >> >> >> >> On Sat, Nov 11, 2023 at 6:05 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> >
> > >> >> >> >> > On Sat, Nov 11, 2023 at 5:46 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >> >> >> >> >>
> > >> >> >> >> >> Hi Frank!!
> > >> >> >> >> >>
> > >> >> >> >> >> thanks for the reply.
> > >> >> >> >> >>
> > >> >> >> >> >> If you don't mind.. here's my setup
> > >> >> >> >> >> ubuntu -- apache2
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >> /etc/apache2/mods-available/alias.conf
> > >> >> >> >> >> ------------------------------------------------------------------
> > >> >> >> >> >> Alias /icons/ "/usr/share/apache2/icons/"
> > >> >> >> >> >> #Alias /wave/ "/var/www/html/wave"
> > >> >> >> >> >> Alias /wave/ "/var/www/html/wave/wave/public"
> > >> >> >> >> >>
> > >> >> >> >> >> <Directory "/usr/share/apache2/icons">
> > >> >> >> >> >>     Options FollowSymlinks
> > >> >> >> >> >>     AllowOverride None
> > >> >> >> >> >>     Require all granted
> > >> >> >> >> >> </Directory>
> > >> >> >> >> >>
> > >> >> >> >> >> -----------------------------------------------------------
> > >> >> >> >> >> ls -al /var/www/html/wave/wave/public
> > >> >> >> >> >>  www-data:www-data  (775)
> > >> >> >> >> >>
> > >> >> >> >> >> ls -al /var/www/html/wave/wave/storage
> > >> >> >> >> >>  www-data:www-data  (775)
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >> /etc/apache2/sites-available/wave
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >> ls -al /etc/apache2/sites-available
> > >> >> >> >> >> -rw-r--r-- 1 root root  516 Nov  2 19:11 wave.conf
> > >> >> >> >> >>
> > >> >> >> >> >> cat /etc/apache2/sites-available/wave.conf
> > >> >> >> >> >> <VirtualHost *:80>
> > >> >> >> >> >>     ServerAdmin admin@xxxxxxxxxxx
> > >> >> >> >> >>     ServerName  temp
> > >> >> >> >> >>     ServerAlias temp
> > >> >> >> >> >>      DocumentRoot   /var/www/html/wave/wave/public
> > >> >> >> >> >>
> > >> >> >> >> >>     <Directory    /var/www/html/wave/wave/public/>
> > >> >> >> >> >>             Options Indexes FollowSymLinks MultiViews
> > >> >> >> >> >>             AllowOverride All
> > >> >> >> >> >>             Order allow,deny
> > >> >> >> >> >>             allow from all
> > >> >> >> >> >>             Require all granted
> > >> >> >> >> >>     </Directory>
> > >> >> >> >> >>
> > >> >> >> >> >>     LogLevel debug
> > >> >> >> >> >>     ErrorLog ${APACHE_LOG_DIR}/error.log
> > >> >> >> >> >>     CustomLog ${APACHE_LOG_DIR}/access.log combined
> > >> >> >> >> >> </VirtualHost>
> > >> >> >> >> >>
> > >> >> >> >> >> ----------------------------------------------------------------------------------------------------
> > >> >> >> >> >>
> > >> >> >> >> >> and then simply run
> > >> >> >> >> >>     a2ensite wave.conf
> > >> >> >> >> >>     service apache2 reload
> > >> >> >> >> >>     systemctl restart apache2
> > >> >> >> >> >>
> > >> >> >> >> >> to restart apache...
> > >> >> >> >> >>
> > >> >> >> >> >> and the test site
> > >> >> >> >> >>  http://161.35.5.174/wave
> > >> >> >> >> >>
> > >> >> >> >> >> should appear??
> > >> >> >> >> >>
> > >> >> >> >> >> Is there anything else you see that I need to implement?
> > >> >> >> >> >>
> > >> >> >> >> >> thanks
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >> On Sat, Nov 11, 2023 at 5:24 PM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
> > >> >> >> >> >> >
> > >> >> >> >> >> >
> > >> >> >> >> >> >
> > >> >> >> >> >> > On Sat, Nov 11, 2023 at 5:16 PM bruce <badouglas@xxxxxxxxx> wrote:
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> Hi.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> Trying to set up a test http://1.2.3.4/foo
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> where I have a laravel/php setup
> > >> >> >> >> >> >>  /var/www/html/foo/foo/public <<<
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> As far as I can tell, there should be an "alias.conf" -- foo.conf in the
> > >> >> >> >> >> >> /etc/apache2/conf-availables/alias.conf
> > >> >> >> >> >> >> /etc/apache2/sites-available/foo
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> and the base httpd.conf
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> I think there needs to be "rewrite" in there somewhere as well.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> Anyone have a solid example of how this should be put together, the
> > >> >> >> >> >> >> steps required.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> I seem to be getting an index list.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> At the same time, once this works, I'm going to also "test/try" to get
> > >> >> >> >> >> >> a javascript app running that can be viewed/displayed from the same
> > >> >> >> >> >> >> test server.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> The test server is a digitalocean ubuntu, easily accessible if you
> > >> >> >> >> >> >> want to look at the dir/tree/files.
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> thanks
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> ---------------------------------------------------------------------
> > >> >> >> >> >> >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> >> >> >> >> >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >> >> >> >> >> >>
> > >> >> >> >> >> >
> > >> >> >> >> >> > All you need is Alias /foo /var/www/html/foo/foo/public in your vhost. Why do you think you need to use mod_rewrite, as well?
> > >> >> >> >> >> >
> > >> >> >> >> >> > Finally, you'll need to configure httpd to parse php content, see:
> > >> >> >> >> >> >
> > >> >> >> >> >> > https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
> > >> >> >> >> >> >
> > >> >> >> >> >> >
> > >> >> >> >> >>
> > >> >> >> >> >> ---------------------------------------------------------------------
> > >> >> >> >> >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> >> >> >> >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >> >> >> >> >>
> > >> >> >> >> >
> > >> >> >> >> > This isn't really a ubuntu-centric mailing list, to be fair.
> > >> >> >> >> >
> > >> >> >> >> > I would recommend you run apachectl -S to verify that:
> > >> >> >> >> >
> > >> >> >> >> > 1) Your vhosts are properly defined
> > >> >> >> >> > 2) Then examine the configuration of each vhost
> > >> >> >> >> >
> > >> >> >> >> > I would also certainly not use 2.2 authz directives, so I would stop reading whatever site or howto recommended that.
> > >> >> >> >>
> > >> >> >> >> ---------------------------------------------------------------------
> > >> >> >> >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> >> >> >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >> >> >> >>
> > >> >> >> >
> > >> >> >> > The Order/Allow/Deny directives should not be used any more, and you should unload the mod_access_compat module as well.
> > >> >> >> >
> > >> >> >> > As for seeing the directory listing, you are probably missing the DirectoryIndex directive.
> > >> >> >>
> > >> >> >> ---------------------------------------------------------------------
> > >> >> >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> >> >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >> >> >>
> > >> >> >
> > >> >> > Since you have a single vhost on port 80, every single http:// request will use it. The main DocumentRoot does not apply, unless you use another port with your request, i.e. 443.
> > >> >> >
> > >> >> > Next, edit your existing vhost, and make sure that the ServerName / DocumentRoot is set properly, as well as the DirectoryIndex / Alias / other directives you need.
> > >> >>
> > >> >> ---------------------------------------------------------------------
> > >> >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >> >>
> > >> >
> > >> > When unsure, always set the ServerName. It would break name-based vhosts when you run into duplicates.
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> > >>
> > >
> > > It will not; it's inherited from the Server context, and if not present there, uses the built-in default. It's not worth focusing on.
> > >
> > > Again, edit your vhost directly, and read about the context for directives.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux