ubuntu – How to Link css which is located out side of the document root

my folder Structure is like

devlopment{
   core{index.php}
   css{index.css}
}

My document root is devlopment/core,
I Want to link index.css file using link tag and href i tried is ../css/index.css Which is not working,
To solve this I found solution that i have to change alias in apache2 server but how to do that i don’t know please help

ubuntu – Nginx Directory Index is Forbidden

I Have Laravel Rest Api for mobile app running under ubuntu – nginx and every thing is working just fine till today, woke up and users can’t access the api and I check nginx error log and found below

2021/04/18 01:21:52 (error) 2772#2772: *138808 directory index of "/var/www/html/mydomain/public/" is forbidden, client: 9x.1x.1x.5x, server: mydomain.com, request: "GET / HTTP/1.>
2021/04/17 23:16:01 (error) 2772#2772: *138792 directory index of "/var/www/html/mydomain/public/" is forbidden, client: 4x.15x.20x.2x1, server: mydomain.com, request: "GET /?XDEBUG>

this is my Nginx config :

server {

    
    root /var/www/html/mydomain/public;

    # Add index.php to the list if you are using PHP
    index index.php;

    server_name mydomain.com www.mydomain.com;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ /index.php?$query_string;
    }

    # pass PHP scripts to FastCGI server
    #
    location ~ .php$ {
        include snippets/fastcgi-php.conf;
    #
    #   # With php-fpm (or other unix sockets):
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    #   # With php-cgi (or other tcp sockets):
    #   fastcgi_pass 127.0.0.1:9000;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /.ht {
        deny all;
    }

    listen (::):443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}

server {
    if ($host = www.mydomain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = mydomain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen (::):80;

    server_name mydomain.com www.mydomain.com;
    return 404; # managed by Certbot

No one changed any thing on the server side and it was working, what is the issue here

Appreciate any help and ideas this is a live project

software installation – Do i need Drivers for Ubuntu 20.10

i am using a dell inspiron with a single boot ubuntu 20.10 x64 (bios), and intel cpu and a switchable amd hd 8670

i was checking out some ubuntu articles(i am new to linux and had some free time) and found a good gnome-shell extension “cpu power manager” , though i didn’t instal it (i dont wanna mess up with anything as i have seen glitched screens and buzzing sound on windows10 due to intel_driver issues)

amd(https://www.amd.com/en/support/graphics/amd-radeon-hd/amd-radeon-hd-8000-series-oem/amd-radeon-hd-8670) and intel both provide separate install-able drivers for my pc , though dell support site says that all needed ones come with Ubuntu itself.. shall i install them?

i remember when i had windows 10(on same pc) i had to install intel then amd then management then chipset then audio then wifi & bluetooth and touchpad drivers…(urhh what a mess it was!)

i am new to ubuntu and so, confused. BTW my current ubuntu install works perfectly fine(i only installed the updates and some apps through snapstore, till now)

ubuntu – Setup Linux Samba to Authenticate all users without Windows throwing Security Alert

I’m trying to setup a Samba Share that authenticates users with any supplied set of credentials. Using the map to guest = ... functionality results in an error for newer Windows 10s You can't access this shared folder because your organization's security policies block unauthenticated guest access.

I thought maybe a PAM module could somehow solve that by mimicking a successful user authentication, no matter the credentials supplied.

Considered using username map to provide a wide variety of username + password variations, but the system user used for the username map can only have one distinct password. Also thought about instead adding an upstream ADDS LDAP server, but because the system is supposed to be a honeypot, I would like to keep it standalone. Any ideas?

tls – ubuntu sources.list urls are not HTTPS — what risk does this present, if any?

I was looking at the installation instructions for VS Code today and found this step curious:

sudo apt install apt-transport-https

I see that there appears to be https transport available for apt:

$ ls -1 /usr/lib/apt/methods
cdrom
copy
file
ftp
gpgv
http
https
mirror
mirror+copy
mirror+file
mirror+ftp
mirror+http
mirror+https
rred
rsh
ssh
store

This made me curious about why Microsoft would have one install that package so I did some searching and ran across this article from cloud flare which points out that even fairly recent versions of Debian require additional steps to secure apt.

I was quite surprised to see that all of the urls in my sources.list are NOT https. My machine is running Ubuntu 20.04, upgraded from Ubuntu 18.04:

$ grep http /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ focal universe
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner
deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse

This seems less than ideal. It occurs to me that https can be more finicky and any failures might impede critical software updates, but this also seems painfully out of date from a security perspective. On the other hand, the information being transferred is open source software, so there isn’t really any risk if someone snoops the packets in transit — it’s not sensitive information, is it?

Still, I’m wondering if there is risk in this. Is the HTTP protocol vulnerable to packet injection in transit? Can anyone lay out what risks there might be in using insecure HTTP traffic for apt?

Trouble with Java in Ubuntu 20.04 vs 18.04 – Compiling JS code with the Google Closure Library

I have a JavaScript project made with the Google Closure library. It uses Java 8 to compile all the JavaScript into one single JS file.

It works flawlessly on Ubuntu 18.04 and compiles as expected. But when compiling after installing Java 8 in Ubuntu 20.04, it throws the following runtime error:

Uncaught TypeError: a.attachEvent is not a function
at Ic (c.js:33)

One more noticeable test I did: It worked when first installing Java 8 in Ubuntu 18.04, then upgrading to 20.04.

So I wanted to gain more clarity on what sort of differences are there in openjdk-8 when installing them on 18.04 and 20.04?

How do I Configure Ubuntu to Write to External SSD as Fast as Windows (Dual-Boot System)

The Windows boot can quickly write files to the external Samsung SSD T5 connected to usb 3.0.

The Ubuntu partition is SOOOOO much slower writing files to the same drive.

Relevant info;

Bus 009 Device 003: ID 04e8:61f5 Samsung Electronics Co., Ltd Portable SSD T5

description: USB controller
product: uPD720200 USB 3.0 Host Controller
vendor: NEC Corporation

i  exfat-fuse - read and write exFAT driver for FUSE
i  exfat-utils - utilities to create, check, label and dump exFAT filesystem

squid – Something updating /run/systemd/resolve/stub-resolv.conf on Ubuntu 20.04 LTS server

I’ve got 2 server. 1 is Ubuntu 18.04 LTE, the other is Ubuntu 20.04 LTE. With the 18.04 version, my /etc/resolve.conf file is fine , I can edit it (I have disabled auto-network configuration on Linodes end, so that it doesn’t get overwritten on reboot).

The issue is with the 20.04 version.

ls -lh /etc/resolv.conf                                                                                                                             lrwxrwxrwx 1 root root 39 Feb 19  2020 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

If I go to: /run/systemd/resolve , I can see the stub-resolv.conf file. When I reload that folder 10-20 seconds in the future, the timestamp has changed. So something is causing it to update. I only bothered to check that folder, as I was getting an error when trying to save the file in pico:

enter image description here

I’m not really sure what else to try to debug what is changing the file / network config? We have unbound installed as Squid Proxy. Could one of those be interfering with it? (that exists on both servers)

software installation – How do I run the precompiled sqlite package on Ubuntu 18.04 without installing it?

I downloaded the precompiled sqlite package from the official page

$ ls -l
total 4168
-rwxr-xr-x 1 ubuntu ubuntu  584260 Apr  2 23:40 sqldiff
-rwxr-xr-x 1 ubuntu ubuntu 1162244 Apr  2 23:41 sqlite3
-rwxr-xr-x 1 ubuntu ubuntu 2516704 Apr  2 23:41 sqlite3_analyzer

However, running it this way doesn’t work

./sqlite3
-bash: ./sqlite3: No such file or directory

I’m running on a Ubuntu 18.04 box. What do I do?

Sound problem after install – Ask Ubuntu

I just installed Kubuntu, and my headphones are not working.. i already tried

sudo alsa force-reload
reinstalled the alsa drivers

Pd: i already chechek if something was muted, on ubuntu this morning everything was workigm just fine.
pd2: the headphones are working, tested on the same AUX on windows, and my phone.

If anyone could help me would be really nice!!

OS: Kubuntu 20.10 x86_64

    -syyyyyyyyyydMMyoyyyydmMMyyyyys-       Host: B450 AORUS M 
   oyyysdMysyyyydMMMMMMMMMMMMMyyyyyyyo     Kernel: 5.8.0-50-generic 
 `oyyyydMMMMysyysoooooodMMMMyyyyyyyyyo`    Uptime: 11 mins 
 oyyyyyydMMMMyyyyyyyyyyyysdMMysssssyyyo    Packages: 1953 (dpkg) 
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy-   Shell: bash 5.0.17 
oyyyysoodMyyyyyyyyyyyyyyyyyyydMMMMysyyyo   Resolution: 1920x1080, 1680x1050 
yyysdMMMMMyyyyyyyyyyyyyyyyyyysosyyyyyyyy   DE: Plasma 5.19.5 
yyysdMMMMMyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy   WM: KWin 
oyyyyysosdyyyyyyyyyyyyyyyyyyydMMMMysyyyo   Theme: Breeze (Plasma), Breeze ( 
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy-   Icons: breeze (Plasma), breeze ( 
 oyyyyyydMMMysyyyyyyyyyyysdMMyoyyyoyyyo    Terminal: konsole 
 `oyyyydMMMysyyyoooooodMMMMyoyyyyyyyyo     CPU: AMD Ryzen 7 2700X (16) @ 3. 
   oyyysyyoyyyysdMMMMMMMMMMMyyyyyyyyo      GPU: AMD ATI Radeon RX 5600 OEM/ 
    -syyyyyyyyydMMMysyyydMMMysyyyys-       Memory: 3400MiB / 16012MiB